summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-11-13 18:34:27 -0500
committerRich Felker <dalias@aerifal.cx>2017-11-13 18:34:27 -0500
commit105eff9dec51bc4898a74af2854ab71f927a5c3b (patch)
tree5ee1447893b7b760c599afb19341b5f8f2eb8ee3
parenta71b46cfd289aa0ff829fc9a436c59c398f8326d (diff)
downloadmusl-105eff9dec51bc4898a74af2854ab71f927a5c3b.tar.gz
generalize iconv framework for 8-bit codepages
previously, 8-bit codepages could only remap the high 128 bytes; the low range was assumed/forced to agree with ascii. interpretation of codepage table headers has been changed so that it's possible to represent mappings for up to 256 slots (fewer if the initial portion of the map is elided because it coincides with unicode codepoints). this requires consuming a bit more of the 10-bit space of characters that can be represented in 8-bit codepages, but there's still a plenty left. the size of the legacy_chars table is actually reduced now by eliding the first 256 entries and considering them to map implicitly via the identity map. before these changes, there seem to have been minor bugs/omissions in codepage table generation, so it's likely that some actual bug fixes are silently included in this commit. round-trip testing of a few codepages was performed on the new version of the code, but no differential testing against the old version was done.
-rw-r--r--src/locale/codepages.h417
-rw-r--r--src/locale/iconv.c27
-rw-r--r--src/locale/legacychars.h75
3 files changed, 273 insertions, 246 deletions
diff --git a/src/locale/codepages.h b/src/locale/codepages.h
index ab146e89..626d1433 100644
--- a/src/locale/codepages.h
+++ b/src/locale/codepages.h
@@ -1,265 +1,288 @@
"iso88591\0"
"latin1\0"
-"\0\200"
+"\0\100"
"iso88592\0"
-"\0\40"
-"\0\330\20\313\32\0\244\21\10\0\0\34\122\310\42\240\0\100\212\50\0\334\60\13\33"
-"\0\250\41\10\54\0\40\142\10\43\241\324\122\312\50\173\0\0\0\15\0\224\201\3\0"
-"\76\0\200\4\0\112\0\0\0\20\102\264\21\7\0\0\334\1\0\0\177\124\2\300\45"
-"\0\0\220\10\0\174\0\0\100\15\0\230\221\3\0\77\0\220\4\0\113\0\0\100\20"
-"\103\270\41\7\0\0\340\1\0\0\200\130\2\0\46\0\0\240\210\54"
+"\0\50"
+"\240\20\364\127\116\244\334\364\324\51\250\124\65\125\126\156\265\42\27\134"
+"\260\24\24\230\116\264\340\4\225\137\270\130\105\225\126\157\15\66\127\134"
+"\111\5\43\214\100\304\314\144\320\61\14\45\143\321\62\30\65\343\214\103"
+"\20\355\364\323\64\324\24\145\315\65\115\215\245\115\131\334\164\163\325\67"
+"\112\205\43\316\100\344\320\164\320\71\15\245\163\321\72\31\265\343\316\103"
+"\21\361\4\324\74\364\30\145\317\75\116\221\245\217\131\374\364\203\25\140"
"iso88593\0"
-"\0\40"
-"\0\130\21\13\0\0\4\100\5\0\0\170\121\210\23\140\0\20\200\50\0\134\1\0\0"
-"\0\0\120\5\0\0\174\141\310\23\141\0\20\300\50\0\0\0\100\0\0\360\240\3\0"
-"\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\100\1\0\0\114\0\0\0\0\0\114\62\10\0"
-"\0\0\0\100\0\0\364\260\3\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\104\1\0\0"
-"\115\0\0\0\0\0\120\102\210\54"
+"\0\50"
+"\240\220\364\327\50\244\0\40\322\51\250\260\64\25\107\56\265\2\0\134"
+"\260\224\44\313\54\264\324\62\322\55\270\264\104\125\107\57\365\2\100\134"
+"\300\4\43\14\0\304\50\204\320\61\310\44\243\314\62\314\64\343\314\63"
+"\0\104\43\315\64\324\170\144\315\65\32\145\243\315\66\334\204\25\325\67"
+"\340\204\43\16\0\344\54\224\320\71\350\244\243\316\72\354\264\343\316\73"
+"\0\304\43\317\74\364\174\144\317\75\33\345\243\317\76\374\210\45\25\140"
"iso88594\0"
-"\0\40"
-"\0\330\100\106\37\0\140\161\6\0\0\34\102\204\24\215\0\100\12\0\0\334\60\213\37"
-"\0\144\201\6\54\0\40\122\304\24\216\314\121\12\35\62\0\0\0\0\0\0\0\0\27"
-"\76\0\200\4\0\106\0\0\200\26\102\274\121\207\30\0\0\0\0\0\0\144\2\0\0"
-"\0\74\22\11\0\63\0\0\0\0\0\0\0\100\27\77\0\220\4\0\107\0\0\300\26"
-"\103\300\141\307\30\0\0\0\0\0\0\150\2\0\0\0\100\42\211\54"
+"\0\50"
+"\240\20\44\323\122\244\230\124\323\51\250\124\45\21\110\133\265\42\327\53"
+"\260\24\24\30\123\264\234\144\223\137\270\130\65\121\110\134\5\65\227\120"
+"\0\5\43\314\60\304\24\143\214\112\14\45\143\321\62\24\65\343\14\112"
+"\20\365\64\24\114\324\124\143\315\65\330\234\245\315\66\334\164\365\325\67"
+"\1\205\43\316\70\344\224\143\316\112\15\245\163\321\72\25\265\343\116\112"
+"\21\371\104\124\114\364\324\143\317\75\370\240\245\317\76\374\170\5\26\140"
"iso88595\0"
-"\0\40"
-"\0\14\104\120\101\6\35\204\120\102\12\55\304\120\103\16\1\360\20\104"
-"\21\111\64\21\105\25\131\164\21\106\31\151\264\21\107\35\171\364\21\110"
-"\41\211\64\22\111\45\231\164\22\112\51\251\264\22\113\55\271\364\22\114"
-"\61\311\64\23\115\65\331\164\23\116\71\351\264\23\117\75\371\364\23\120"
-"\101\11\65\24\121\105\31\165\24\122\111\51\265\24\123\115\71\365\24\124"
-"\127\106\45\325\124\124\125\145\325\125\130\145\245\325\126\134\15\320\225\127"
+"\0\50"
+"\240\104\47\335\164\324\125\147\335\165\330\145\247\335\166"
+"\334\265\322\235\167\337\201\27\236\170\343\221\127\236\171"
+"\347\241\227\236\172\353\261\327\236\173\357\301\27\237\174"
+"\363\321\127\237\175\367\341\227\237\176\373\361\327\237\177\377\1\30\240\200"
+"\3\22\130\240\201\7\42\230\240\202\13\62\330\240\203\17\102\30\241\204"
+"\23\122\130\241\205\27\142\230\241\206\33\162\330\241\207\46\177\10\142\210"
+"\42\216\110\142\211\46\236\210\142\212\52\236\262\42\213"
"iso88596\0"
-"\0\40"
-"\0\4\20\100\0\0\4\20\100\0\1\4\20\100\0\224\1\20\100\0\1\4\20\100\0"
-"\1\4\20\100\0\1\4\20\100\145\1\4\20\200\145\1\134\206\131\146"
-"\232\155\306\131\147\236\175\6\132\150\242\215\106\132\151\246\235\206\132\152"
-"\252\255\306\132\153\256\275\6\133\0\1\4\20\100\0\261\311\66\33\155"
-"\265\331\166\33\156\271\351\266\33\157\275\371\366\33\160\301\11\67\134\0"
-"\1\4\20\100\0\1\4\20\100\0\1\4\20\100\0"
+"\0\50"
+"\240\0\0\0\0\244\0\0\0\0\0\0\0\0\0\142\266\2\0\0\0\0\0\0\0\0\0\0\0\0"
+"\0\0\0\300\230\0\0\0\0\231\0\224\151\346\231\150\246\251\346\232"
+"\154\266\351\346\233\160\306\51\347\234\164\326\151\347\235"
+"\170\346\251\347\236\174\366\351\47\0\0\0\0\0\0\177\2\32\250\240"
+"\203\22\132\250\241\207\42\232\250\242\213\62\332\250\243\217\102\32\51\0"
+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
"iso88597\0"
-"\0\40"
-"\0\24\151\44\0\124\126\11\0\0\0\0\260\13\0\0\0\20\300\220\0\0\0\0\0"
-"\274\364\342\13\0\277\0\23\14\0\302\0\60\14\61\305\30\163\14\62"
-"\311\50\263\14\63\315\70\363\14\64\321\110\63\15\65\325\130\23\300\65"
-"\330\144\243\315\66\334\164\343\315\67\340\204\43\316\70\344\224\143\316\71"
-"\350\244\243\316\72\354\264\343\316\73\360\304\43\317\74\364\324\143\317\75"
-"\370\344\243\317\76\374\364\343\317\77\0\5\44\120\0"
+"\0\50"
+"\240\114\114\361\50\44\227\154\312\51\250\244\222\330\52\254\264\2\100\304"
+"\260\304\42\313\54\212\55\306\330\55\215\71\366\330\56\220\365\22\231\144"
+"\223\121\126\231\145\227\141\226\231\146\233\161\326\231\147"
+"\237\201\26\232\150\243\221\6\100\151\246\235\206\132\152\252\255\306\132\153"
+"\256\275\6\133\154\262\315\106\133\155\266\335\206\133\156\272\355\306\133\157"
+"\276\375\6\134\160\302\15\107\134\161\306\35\207\134\162\312\55\307\134\163"
+"\316\75\7\35\0"
"iso88598\0"
-"\0\40"
-"\0\4\0\0\0\0\0\0\0\0\0\0\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\0\0"
-"\0\0\0\100\0\1\4\20\100\0\1\4\20\100\0\1\4\20\100\0\1\4\20\100\0\1\4\20\100\0"
-"\1\4\20\100\0\1\4\20\100\0\1\4\20\0\221\164\325\145\327\135"
-"\170\345\245\327\136\174\365\345\327\137\200\5\46\330\140\204\25\146\330\141"
-"\210\45\246\330\142\214\65\346\130\0\1\374\10\144\0"
+"\0\50"
+"\240\0\40\312\50\244\224\142\312\51\250\244\162\315\52\254\264\342\312\53"
+"\260\304\42\313\54\264\324\142\313\55\270\344\162\317\56\274\364\342\13\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\200\304\102\16\111\144\221\106\36\211\144\222\112\56\311\144\223"
+"\116\76\11\145\224\122\116\111\145\225\126\136\211\145\226\132\156\311\45\0"
+"\0\64\354\60\0"
"iso88599\0"
-"\0\120"
-"\116\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\170\121\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-"\0\0\0\0\0\117\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\174\141\10\0"
+"\0\64"
+"\34\105\43\315\64\324\124\143\315\65\330\144\243\315\66\334\260\64\325\67"
+"\340\204\43\316\70\344\224\143\316\71\350\244\243\316\72\354\264\343\316\73"
+"\35\305\43\317\74\364\324\143\317\75\370\344\243\317\76\374\264\104\325\77"
"iso885910\0"
-"\0\40"
-"\0\330\100\204\24\132\140\41\6\0\147\10\161\110\43\244\0\20\311\34"
-"\0\334\120\304\24\133\144\61\6\0\150\14\201\210\43\245\14\51\11\35\62\0\0\0\0"
-"\0\0\0\0\27\76\0\200\4\0\106\0\0\0\0\0\274\121\7\0\0\0\0\300\43\0\144\2\0\0"
-"\0\0\0\0\0\63\0\0\0\0\0\0\0\100\27\77\0\220\4\0\107\0\0\0\0\0\300\141\7\0"
-"\0\0\0\0\44\0\150\2\0\0\0\0\0\0\31"
+"\0\50"
+"\240\20\44\21\110\50\231\4\323\51\65\101\124\325\126\162\265\362\125\120"
+"\260\24\64\121\110\51\235\24\323\55\66\105\144\25\127\163\105\14\226\120"
+"\0\5\43\314\60\304\24\143\214\112\14\45\143\321\62\24\65\343\314\63"
+"\320\364\64\324\64\324\124\143\115\127\330\234\245\315\66\334\164\343\315\67"
+"\1\205\43\316\70\344\224\143\316\112\15\245\163\321\72\25\265\343\316\73"
+"\360\370\104\324\74\364\324\143\217\127\370\240\245\317\76\374\364\343\217\114"
"iso885911\0"
"tis620\0"
-"\0\40"
-"\0\100\27\235\164\323\121\127\235\165\327\141\227\235\166\333\161\327\235\167"
-"\337\201\27\236\170\343\221\127\236\171\347\241\227\236\172"
-"\353\261\327\236\173\357\301\27\237\174\363\321\127\237\175"
-"\367\341\227\237\176\373\361\327\237\177\377\1\30\240\200\3\22\130\240\201"
-"\7\42\230\140\0\1\4\20\200\202\13\62\330\240\203\17\102\30\241\204"
-"\23\122\130\241\205\27\142\230\241\206\33\162\330\241\207\37\202\30\242\210"
-"\43\222\130\242\211\1\4\20\100\0"
+"\0\50"
+"\240\170\372\51\250\241\212\72\52\251\245\232\172\52\252\251\252\272\52\253"
+"\255\272\372\52\254\261\312\72\53\255\265\332\172\53\256\271\352\272\53\257"
+"\275\372\372\53\260\301\12\73\54\261\305\32\173\54\262\311\52\273\54\263"
+"\315\72\373\54\264\321\112\73\55\265\325\132\173\55\0\0\0\0\0\266"
+"\331\152\273\55\267\335\172\373\55\270\341\212\73\56\271\345\232\173\56\272"
+"\351\252\273\56\273\355\272\373\56\274\361\312\73\57\275\0\0\0\0\0"
"iso885913\0"
-"\0\40"
-"\0\44\11\0\0\0\50\11\0\0\15\0\320\7\0\0\0\0\300\2\0\0\0\0\0\110\2\0\0\0"
-"\20\0\340\7\0\0\0\0\200\3\66\160\41\3\16\0\0\200\4\21\76\0\0\212\21"
-"\122\210\241\305\31\207\264\361\6\0\165\0\0\0\0\231\254\21\110\44"
-"\0\210\102\12\0\67\164\61\103\16\0\0\220\104\21\77\0\20\312\21"
-"\123\214\261\5\32\210\270\1\7\0\166\0\0\0\0\232\260\41\210\44"
-"\0\214\122\212\221"
+"\0\50"
+"\240\134\54\312\50\244\140\154\312\51\330\244\262\324\52\254\264\342\212\61"
+"\260\304\42\313\54\26\327\142\313\55\370\344\302\324\56\274\364\342\213\71"
+"\4\251\4\220\101\304\24\143\221\104\14\45\343\26\105\40\301\204\122\115"
+"\125\355\324\323\64\103\125\143\315\65\147\345\364\324\127\334\300\45\327\67"
+"\5\255\24\320\101\344\224\163\321\104\15\245\363\126\105\41\305\224\222\115"
+"\126\361\344\323\74\104\325\143\317\75\150\351\4\25\130\374\304\65\27\305"
"iso885914\0"
-"\0\40"
-"\0\234\210\42\0\74\364\220\42\0\65\2\160\243\212\73\2\0\300\47"
-"\53\262\10\105\24\55\272\10\300\213\66\302\210\143\214\74\346\250\243\214"
-"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\233\0\0\0\0\0\0\0\300\214\0\0\0\0\0"
-"\0\0\320\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\234\0\0\0\0\0\0\0\0\215"
-"\0\0\0\0\0\0\0\340\11\0"
+"\0\50"
+"\240\324\153\357\50\12\55\164\357\51\3\247\122\60\276\11\267\342\112\133"
+"\371\352\353\321\107\373\362\153\113\277\4\373\153\360\277\12\37\214\60\300"
+"\300\4\43\314\60\304\24\143\314\61\310\44\243\314\62\314\64\343\314\63"
+"\151\105\43\315\64\324\124\143\115\300\330\144\243\315\66\334\164\263\326\67"
+"\340\204\43\316\70\344\224\143\316\71\350\244\243\316\72\354\264\343\316\73"
+"\152\305\43\317\74\364\324\143\217\300\370\344\243\317\76\374\364\303\326\77"
"iso885915\0"
"latin9\0"
-"\0\44"
-"\124\2\160\10\0\210\0\0\0\0\0\0\0\0\0\0\0\0\0\0\244\0\0\0\0\245\0\0\0\0"
-"\171\350\361\11\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\0\0"
-"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+"\0\51"
+"\44\227\122\325\51\126\245\242\312\52\254\264\342\312\53\260\304\42\313\54"
+"\162\325\142\313\55\163\345\242\313\56\107\41\325\326\57\300\4\43\314\60"
+"\304\24\143\314\61\310\44\243\314\62\314\64\343\314\63\320\104\43\315\64"
+"\324\124\143\315\65\330\144\243\315\66\334\164\343\315\67\340\204\43\316\70"
+"\344\224\143\316\71\350\244\243\316\72\354\264\343\316\73\360\304\43\317\74"
+"\364\324\143\317\75\370\344\243\317\76\374\364\343\317\77"
"iso885916\0"
-"\0\40"
-"\0\330\160\303\32\124\52\171\10\0\210\0\260\12\0\240\0\20\212\50\0\0\340\3\33"
-"\244\44\11\0\0\245\374\300\12\0\171\350\361\311\50\0\0\0\0\15\0\340\0\0\0"
-"\0\0\0\0\0\0\0\0\0\0\102\264\1\0\0\0\334\1\100\40\227\0\0\0\0\0\40\321\12\0"
-"\0\0\0\100\15\0\344\0\0\0\0\0\0\0\0\0\0\0\0\0\103\270\1\0\0\0\340\1\200\40"
-"\230\0\0\0\0\0\44\341\12\0"
+"\0\50"
+"\240\20\124\120\116\44\143\134\325\51\126\245\222\327\52\156\265\362\26\134"
+"\260\304\302\220\116\162\135\154\313\55\163\65\244\327\56\107\41\325\126\134"
+"\300\4\43\214\100\304\30\144\314\61\310\44\243\314\62\314\64\343\314\63"
+"\20\355\44\315\64\324\24\145\315\123\145\145\243\315\66\334\130\264\327\67"
+"\340\204\43\316\100\344\34\144\316\71\350\244\243\316\72\354\264\343\316\73"
+"\21\361\44\317\74\364\30\145\17\124\146\345\243\317\76\374\134\304\327\77"
"cp1250\0"
"windows1250\0"
-"\0\0"
-"\124\6\160\144\0\112\72\271\44\223\1\74\171\10\224\201\54\102\12\50"
-"\1\24\151\44\222\111\66\31\244\220\1\140\211\110\224\202\60\122\112\50"
-"\0\300\22\313\32\0\330\0\0\0\0\0\120\10\0\0\0\0\200\50\0\0\60\13\33\0\0\0\0\0"
-"\0\334\140\10\0\151\324\242\306\50\173\0\0\0\15\0\224\201\3\0\76\0\200\4\0"
-"\112\0\0\0\20\102\264\21\7\0\0\334\1\0\0\177\124\2\300\45\0\0\220\10\0"
-"\174\0\0\100\15\0\230\221\3\0\77\0\220\4\0\113\0\0\100\20\103\270\41\7\0"
-"\0\340\1\0\0\200\130\2\0\46\0\0\240\210\54"
+"\0\40"
+"\44\3\120\61\0\30\163\234\261\306\0\164\134\225\307\117\145\45\227\133"
+"\0\114\114\261\305\27\157\374\60\304\0\234\154\325\307\120\151\65\327\133"
+"\240\370\365\127\116\244\20\144\312\51\250\244\62\325\52\254\264\342\12\134"
+"\260\304\22\230\116\264\324\142\313\55\270\24\104\325\56\67\15\206\123\134"
+"\111\5\43\214\100\304\314\144\320\61\14\45\143\321\62\30\65\343\214\103"
+"\20\355\364\323\64\324\24\145\315\65\115\215\245\115\131\334\164\163\325\67"
+"\112\205\43\316\100\344\320\164\320\71\15\245\163\321\72\31\265\343\316\103"
+"\21\361\4\324\74\364\30\145\317\75\116\221\245\217\131\374\364\203\25\140"
"cp1251\0"
"windows1251\0"
-"\0\0"
-"\4\25\164\344\124\112\72\271\44\223\124\76\271\20\224\14\71\324\20\104"
-"\122\25\151\44\222\111\66\31\244\220\1\140\231\125\224\132\161\265\225\127"
-"\0\74\324\225\102\0\174\5\0\0\3\1\140\20\0\0\0\0\100\102\0\0\200\220\125"
-"\140\1\0\0\0\121\135\111\25\0\130\35\124\325\125\21\111\64\21\105"
-"\25\131\164\21\106\31\151\264\21\107\35\171\364\21\110\41\211\64\22\111"
-"\45\231\164\22\112\51\251\264\22\113\55\271\364\22\114\61\311\64\23\115"
-"\65\331\164\23\116\71\351\264\23\117\75\371\364\23\120\101\11\65\24\121"
-"\105\31\165\24\122\111\51\265\24\123\115\71\365\24\124"
+"\0\40"
+"\322\115\127\161\210\30\163\234\261\306\44\167\234\235\307\332\161\267\235\167"
+"\40\116\114\261\305\27\157\374\60\304\0\234\174\342\307\50\252\230\42\213"
+"\240\164\267\42\166\244\264\150\312\51\321\245\102\335\52\254\264\342\312\165"
+"\260\304\142\35\211\56\326\142\313\55\37\232\54\342\56\46\126\67\142\211"
+"\337\201\27\236\170\343\221\127\236\171\347\241\227\236\172"
+"\353\261\327\236\173\357\301\27\237\174\363\321\127\237\175"
+"\367\341\227\237\176\373\361\327\237\177\377\1\30\240\200\3\22\130\240\201"
+"\7\42\230\240\202\13\62\330\240\203\17\102\30\241\204\23\122\130\241\205"
+"\27\142\230\241\206\33\162\330\241\207"
"cp1252\0"
"windows1252\0"
-"\0\0"
-"\124\6\160\244\51\112\72\271\44\223\257\74\171\10\224\171\4\100\112\0"
-"\1\24\151\44\222\111\66\31\244\220\264\140\211\110\224\172\4\120\312\47"
-"\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\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\40"
+"\44\3\120\61\135\30\163\234\261\306\175\165\134\225\307\107\1\40\27\0"
+"\0\114\114\261\305\27\157\374\60\304\202\235\154\325\307\110\1\60\127\133"
+"\240\204\42\312\50\244\224\142\312\51\250\244\242\312\52\254\264\342\312\53"
+"\260\304\42\313\54\264\324\142\313\55\270\344\242\313\56\274\364\342\313\57"
+"\300\4\43\314\60\304\24\143\314\61\310\44\243\314\62\314\64\343\314\63"
+"\320\104\43\315\64\324\124\143\315\65\330\144\243\315\66\334\164\343\315\67"
+"\340\204\43\316\70\344\224\143\316\71\350\244\243\316\72\354\264\343\316\73"
+"\360\304\43\317\74\364\324\143\317\75\370\344\243\317\76\374\364\343\317\77"
"cp1253\0"
"windows1253\0"
-"\0\0"
-"\124\6\160\244\51\112\72\271\44\223\1\74\31\0\224\1\4\20\100\0\1\24\151\44\222"
-"\111\66\31\244\220\1\140\31\100\224\1\4\20\100\0\0\364\342\13\0\0\0\0\0\0"
-"\0\0\20\0\0\0\0\0\300\220\0\0\0\0\0\274\0\0\0\0\277\0\23\14\0\302\0\60\14\61"
-"\305\30\163\14\62\311\50\263\14\63\315\70\363\14\64\321\110\63\15\65"
-"\325\130\23\300\65\330\144\243\315\66\334\164\343\315\67\340\204\43\316\70"
-"\344\224\143\316\71\350\244\243\316\72\354\264\343\316\73\360\304\43\317\74"
-"\364\324\143\317\75\370\344\243\317\76\374\364\343\317\77\0\5\44\120\0"
+"\0\40"
+"\44\3\120\61\135\30\163\234\261\306\0\164\14\200\307\0\0\0\0\0"
+"\0\114\114\261\305\27\157\374\60\304\0\234\14\300\307\0\0\0\0\0"
+"\240\54\306\330\50\244\224\142\312\51\250\244\2\300\52\254\264\342\112\304"
+"\260\304\42\313\54\212\325\142\313\55\215\71\366\330\56\220\365\22\231\144"
+"\223\121\126\231\145\227\141\226\231\146\233\161\326\231\147"
+"\237\201\26\232\150\243\221\6\100\151\246\235\206\132\152\252\255\306\132\153"
+"\256\275\6\133\154\262\315\106\133\155\266\335\206\133\156\272\355\306\133\157"
+"\276\375\6\134\160\302\15\107\134\161\306\35\207\134\162\312\55\307\134\163"
+"\316\75\7\35\0"
"cp1254\0"
"windows1254\0"
-"\0\0"
-"\124\6\160\244\51\112\72\271\44\223\257\74\171\10\224\171\4\20\100\0"
-"\1\24\151\44\222\111\66\31\244\220\264\140\211\110\224\172\4\20\300\47"
-"\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\116\0\0\0\0\0\0\0\0\0"
-"\0\0\0\0\0\0\170\121\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\117\0\0\0\0"
-"\0\0\0\0\0\0\0\0\0\0\0\174\141\10\0"
+"\0\40"
+"\44\3\120\61\135\30\163\234\261\306\175\165\134\225\307\107\1\0\0\0"
+"\0\114\114\261\305\27\157\374\60\304\202\235\154\325\307\110\1\0\100\133"
+"\240\204\42\312\50\244\224\142\312\51\250\244\242\312\52\254\264\342\312\53"
+"\260\304\42\313\54\264\324\142\313\55\270\344\242\313\56\274\364\342\313\57"
+"\300\4\43\314\60\304\24\143\314\61\310\44\243\314\62\314\64\343\314\63"
+"\34\105\43\315\64\324\124\143\315\65\330\144\243\315\66\334\260\64\325\67"
+"\340\204\43\316\70\344\224\143\316\71\350\244\243\316\72\354\264\343\316\73"
+"\35\305\43\317\74\364\324\143\317\75\370\344\243\317\76\374\264\104\325\77"
"cp1255\0"
"windows1255\0"
-"\0\0"
-"\124\6\160\244\51\112\72\271\44\223\257\74\31\0\224\1\4\20\100\0"
-"\1\24\151\44\222\111\66\31\244\220\264\140\31\100\224\1\4\20\100\0\0\0\0\0\0"
-"\122\2\0\0\0\0\0\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\0\0\0\0\0\0\0"
-"\141\211\65\26\131\145\231\165\26\132\151\251\25\300\132\154\265\345\326\133"
-"\160\305\45\327\134\217\101\26\231\144\223\5\20\100\0\1\4\20\100\0"
-"\164\325\145\327\135\170\345\245\327\136\174\365\345\327\137\200\5\46\330\140"
-"\204\25\146\330\141\210\45\246\330\142\214\65\346\130\0\1\374\10\144\0"
+"\0\40"
+"\44\3\120\61\135\30\163\234\261\306\175\165\14\200\307\0\0\0\0\0"
+"\0\114\114\261\305\27\157\374\60\304\202\235\14\300\307\0\0\0\0\0"
+"\240\204\42\312\50\42\227\142\312\51\250\244\162\315\52\254\264\342\312\53"
+"\260\304\42\313\54\264\324\142\313\55\270\344\162\317\56\274\364\342\313\57"
+"\57\302\30\243\214\63\322\130\243\215\67\342\10\100\216\72\356\310\143\217"
+"\76\376\10\144\220\135\172\371\45\230\141\2\0\0\0\0\0\0\0\0\102\16\111\144\221"
+"\106\36\211\144\222\112\56\311\144\223\116\76\11\145\224\122\116\111\145\225"
+"\126\136\211\145\226\132\156\311\45\0\0\64\354\60\0"
"cp1256\0"
"windows1256\0"
-"\0\0"
-"\124\26\167\244\51\112\72\271\44\223\257\74\111\34\224\171\30\227\334\161"
-"\313\25\151\44\222\111\66\31\244\220\312\141\211\134\224\172\364\350\43\163"
-"\0\120\6\0\0\0\0\0\0\0\0\0\320\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\120\31\0"
-"\0\0\0\200\145\316\135\206\131\146\232\155\306\131\147\236\175\6\132\150"
-"\242\215\106\132\151\246\235\206\132\152\252\255\306\32\0\255\271\366\32\154"
-"\261\311\66\33\155\0\324\6\200\155\267\341\226\33\0\0\0\0\0\0\272\355\6\0\0"
-"\274\365\346\333\157\0\0\27\34\0\302\1\60\34\0\0\374\10\344\163"
+"\0\40"
+"\44\117\132\61\135\30\163\234\261\306\175\165\54\251\307\107\121\172\151\245"
+"\231\116\114\261\305\27\157\374\60\304\230\236\154\351\307\110\55\314\260\246"
+"\240\210\51\312\50\244\224\142\312\51\250\244\262\351\52\254\264\342\312\53"
+"\260\304\42\313\54\264\324\142\313\55\270\344\62\346\56\274\364\342\13\231"
+"\234\226\151\346\231\150\246\251\346\232\154\266\351\346\233"
+"\160\306\51\347\234\164\326\151\347\235\170\346\251\347\65\173\362\331\247\237"
+"\177\2\32\250\240\340\14\52\16\241\205\32\172\350\71\350\244\243\316\72"
+"\210\46\352\316\73\212\56\312\150\243\364\70\372\350\75\220\346\23\351\76"
+"\374\64\354\160\247"
"cp1257\0"
"windows1257\0"
-"\0\0"
-"\124\6\160\144\0\112\72\271\44\223\1\74\31\0\224\1\20\0\213\2\1\24\151\44\222"
-"\111\66\31\244\220\1\140\31\100\224\1\30\60\113\0\0\4\0\0\0\0\4\0\0\0"
-"\15\0\320\7\0\0\0\0\300\2\0\0\0\0\0\0\0\0\0\0\20\0\340\7\0\0\0\0\200\3"
-"\66\160\41\3\16\0\0\200\4\21\76\0\0\212\21\122\210\241\305\31\207\264\361\6\0"
-"\165\0\0\0\0\231\254\21\110\44\0\210\102\12\0\67\164\61\103\16\0\0\220\104\21"
-"\77\0\20\312\21\123\214\261\5\32\210\270\1\7\0\166\0\0\0\0\232\260\41\210\44"
-"\0\214\122\212\54"
+"\0\40"
+"\44\3\120\61\0\30\163\234\261\306\0\164\14\200\307\0\240\342\27\56"
+"\0\114\114\261\305\27\157\374\60\304\0\234\14\300\307\0\274\22\30\0"
+"\240\0\40\312\50\244\0\140\312\51\330\244\262\324\52\254\264\342\212\61"
+"\260\304\42\313\54\264\324\142\313\55\370\344\302\324\56\274\364\342\213\71"
+"\4\251\4\220\101\304\24\143\221\104\14\45\343\26\105\40\301\204\122\115"
+"\125\355\324\323\64\103\125\143\315\65\147\345\364\324\127\334\300\45\327\67"
+"\5\255\24\320\101\344\224\163\321\104\15\245\363\126\105\41\305\224\222\115"
+"\126\361\344\323\74\104\325\143\317\75\150\351\4\25\130\374\304\65\27\140"
"cp1258\0"
"windows1258\0"
-"\0\0"
-"\124\6\160\244\51\112\72\271\44\223\257\74\31\0\224\171\4\20\100\0"
-"\1\24\151\44\222\111\66\31\244\220\264\140\31\100\224\172\4\20\300\47"
-"\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\15\0\0\0\0\0\0\0\0\0\0\266\0\0\0\0\102\0\220\13\0"
-"\0\234\2\0\0\0\0\0\0\0\0\244\202\13\0\0\0\0\100\15\0\0\0\0\0\0\0\0\0\0"
-"\267\0\0\0\0\103\0\240\13\0\0\240\2\0\0\0\0\0\0\0\0\250\62\45\0"
+"\0\40"
+"\44\3\120\61\135\30\163\234\261\306\175\165\14\200\307\107\1\0\0\0"
+"\0\114\114\261\305\27\157\374\60\304\202\235\14\300\307\110\1\0\100\133"
+"\240\204\42\312\50\244\224\142\312\51\250\244\242\312\52\254\264\342\312\53"
+"\260\304\42\313\54\264\324\142\313\55\270\344\242\313\56\274\364\342\313\57"
+"\300\4\43\214\100\304\24\143\314\61\310\44\243\314\62\204\65\343\314\63"
+"\20\105\163\330\64\324\324\145\315\65\330\144\243\315\66\334\334\145\330\67"
+"\340\204\43\316\100\344\224\143\316\71\350\244\243\316\72\205\265\343\316\73"
+"\21\305\203\330\74\364\330\145\317\75\370\344\243\317\76\374\340\65\362\77"
"koi8r\0"
-"\0\0"
-"\140\206\51\346\230\144\226\151\346\231\150\246\251\46\242\211\52\272\50\243"
-"\215\72\372\250\227\220\146\251\345\226\134\166\51\300\227\7\40\220\300\3"
-"\153\262\331\146\124\156\276\11\147\234\162\316\111\147\235"
-"\166\336\211\147\236\172\356\311\347\100\175\372\371\47\240\201\12\72\50\241"
-"\205\32\172\150\1\117\305\44\323\121\65\331\124\24\115\106\345\244\323\116"
-"\74\365\344\323\117\100\101\25\224\120\103\21\165\323\114\115\61\205\123\122"
-"\116\51\205\324\122\57\105\44\321\111\25\131\124\22\105\46\145\244\321\106"
-"\34\165\344\321\107\40\301\24\222\110\43\221\164\321\104\55\261\204\121\112"
-"\56\251\204\322\112"
+"\0\40"
+"\63\323\134\263\315\67\343\234\263\316\73\363\334\363\326\134\167\355\365\327"
+"\140\207\55\166\314\143\243\234\62\313\56\277\14\212\314\260\310\162\313\75"
+"\76\377\14\364\207\101\13\75\64\321\105\33\175\64\322\111\53\275\64\323"
+"\115\73\375\164\164\120\107\55\365\324\124\127\155\365\325\130\147\255\165\52"
+"\35\376\7\140\205\3\22\70\241\200\24\36\210\140\202\12\56\310\140\203"
+"\16\172\370\40\204\21\112\130\140\200\33\152\150\340\205\34\142\150\141\206"
+"\375\175\7\136\175\343\221\67\237\170\364\235\207\136\172\352\255\307\136\173"
+"\356\371\367\36\174\361\311\127\136\170\373\351\147\336\175"
+"\374\341\147\137\176"
"koi8u\0"
-"\0\0"
-"\140\206\51\346\230\144\226\151\346\231\150\246\251\46\242\211\52\272\50\243"
-"\215\72\372\250\227\220\146\251\345\226\134\166\51\300\227\7\40\220\300\3"
-"\153\262\331\146\124\124\275\151\325\125\162\316\111\147\235"
-"\166\202\205\147\236\172\356\311\347\100\6\371\211\120\102\201\12\72\50\241"
-"\205\176\165\150\1\117\305\44\323\121\65\331\124\24\115\106\345\244\323\116"
-"\74\365\344\323\117\100\101\25\224\120\103\21\165\323\114\115\61\205\123\122"
-"\116\51\205\324\122\57\105\44\321\111\25\131\124\22\105\46\145\244\321\106"
-"\34\165\344\321\107\40\301\24\222\110\43\221\164\321\104\55\261\204\121\112"
-"\56\251\204\322\112"
+"\0\40"
+"\63\323\134\263\315\67\343\234\263\316\73\363\334\363\326\134\167\355\365\327"
+"\140\207\55\166\314\143\243\234\62\313\56\277\14\212\314\260\310\162\313\75"
+"\76\377\14\364\207\42\12\115\142\211\105\33\175\64\322\111\273\270\64\323"
+"\115\73\375\164\164\324\105\155\335\165\124\127\155\365\325\130\267\250\165\52"
+"\35\376\7\140\205\3\22\70\241\200\24\36\210\140\202\12\56\310\140\203"
+"\16\172\370\40\204\21\112\130\140\200\33\152\150\340\205\34\142\150\141\206"
+"\375\175\7\136\175\343\221\67\237\170\364\235\207\136\172\352\255\307\136\173"
+"\356\371\367\36\174\361\311\127\136\170\373\351\147\336\175"
+"\374\341\147\137\176"
"cp437\0"
-"\0\0"
-"\27\300\100\202\7\37\164\0\202\10\45\230\60\102\12\50\234\100\101\5"
-"\30\70\260\300\12\54\250\360\202\13\61\144\300\101\4\22\114\140\245\51"
-"\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244"
-"\215\72\372\150\230\147\362\331\147\234\160\372\311\246\234"
-"\170\336\151\347\230\144\246\211\246\231\140\252\231\247\236"
-"\165\276\111\150\240\173\256\171\250\240\203\376\11\50\235\163\266\351\246\241"
-"\205\226\51\246\242\211\56\312\50\242\345\104\212\14\75\327\334\23\51\76"
-"\332\64\323\15\72\221\352\223\116\244\221\106\332\45\227\136\176\371\300\226"
-"\7\144\231\200\226\221\42\0\251\0"
+"\0\40"
+"\307\360\223\216\70\344\200\123\316\71\352\254\203\316\73\356\260\103\114\61"
+"\311\230\143\14\75\366\310\263\117\76\377\130\303\215\50\243\224\22\62\135"
+"\341\264\63\217\76\361\104\243\212\56\277\300\314\112\57\274\204\262\312\56"
+"\140\207\55\66\315\72\77\15\65\321\103\107\375\163\321\113\53\235\264\315"
+"\67\363\274\163\316\63\367\314\164\323\110\13\175\65\325\116\373\254\165\325"
+"\126\113\75\365\321\106\3\35\164\326\130\343\134\163\327\134\173\375\365\326"
+"\263\175\143\231\160\245\25\127\213\161\250\155\266\232\155\52\43\167\333\312"
+"\55\307\362\262\313\61\313\174\17\313\260\240\174\113\312\40\313\62\66\50"
"cp850\0"
-"\0\0"
-"\27\300\100\202\7\37\164\0\202\10\45\230\60\102\12\50\234\100\101\5"
-"\30\70\260\300\12\54\250\360\202\13\61\144\300\1\4\22\64\300\200\51"
-"\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244"
-"\215\72\372\150\230\147\106\32\151\244\5\370\311\246\234\170\106\60\301\230"
-"\144\246\211\246\231\140\252\31\151\244\165\276\111\150\240"
-"\173\256\171\150\244\221\106\32\151\244\221\176\21\151\244\221\226\51\246\242"
-"\211\106\32\51\242\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244"
-"\221\106\152\100\244\221\106\112\144\244\221\16\360\200\2\7\20\220\100\244"
-"\221\42\0\251\0"
+"\0\40"
+"\307\360\223\216\70\344\200\123\316\71\352\254\203\316\73\356\260\103\114\61"
+"\311\230\143\14\75\366\310\263\117\76\377\130\303\15\76\243\140\163\15\135"
+"\341\264\63\217\76\361\104\243\212\56\277\270\302\112\57\274\204\262\312\56"
+"\140\207\55\66\315\72\7\43\14\60\251\104\375\163\321\113\213\122\212\315"
+"\67\363\274\163\316\63\367\74\316\60\110\13\175\65\325\116\373\254\65\51"
+"\360\100\243\314\62\310\264\324\214\63\317\340\134\163\327\134\233\302\314\326"
+"\323\174\103\215\64\365\124\123\213\77\336\150\263\115\66\375\164\363\12\55"
+"\255\304\42\261\57\266\234\162\17\56\260\240\162\113\56\263\310\62\66\50"
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
index 2107b055..01f17521 100644
--- a/src/locale/iconv.c
+++ b/src/locale/iconv.c
@@ -27,8 +27,10 @@
/* Definitions of charmaps. Each charmap consists of:
* 1. Empty-string-terminated list of null-terminated aliases.
- * 2. Special type code or number of elided entries.
- * 3. Character table (size determined by field 2). */
+ * 2. Special type code or number of elided quads of entries.
+ * 3. Character table (size determined by field 2), consisting
+ * of 5 bytes for every 4 characters, interpreted as 10-bit
+ * indices into the legacy_chars table. */
static const unsigned char charmaps[] =
"utf8\0char\0\0\310"
@@ -51,6 +53,9 @@ static const unsigned char charmaps[] =
#include "codepages.h"
;
+/* Table of characters that appear in legacy 8-bit codepages,
+ * limited to 1024 slots (10 bit indices). The first 256 entries
+ * are elided since those characters are obviously all included. */
static const unsigned short legacy_chars[] = {
#include "legacychars.h"
};
@@ -96,7 +101,7 @@ static size_t find_charmap(const void *name)
s += strlen((void *)s)+1;
if (!*s) {
if (s[1] > 0200) s+=2;
- else s+=2+(128U-s[1])/4*5;
+ else s+=2+(64U-s[1])*5;
}
}
return -1;
@@ -181,10 +186,10 @@ static void put_32(unsigned char *s, unsigned c, int e)
static unsigned legacy_map(const unsigned char *map, unsigned c)
{
- unsigned x = c - 128 - map[-1];
- x = legacy_chars[ map[x*5/4]>>2*x%8 |
- map[x*5/4+1]<<8-2*x%8 & 1023 ];
- return x ? x : c;
+ if (c < 4*map[-1]) return c;
+ unsigned x = c - 4*map[-1];
+ x = map[x*5/4]>>2*x%8 | map[x*5/4+1]<<8-2*x%8 & 1023;
+ return x < 256 ? x : legacy_chars[x-256];
}
size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restrict out, size_t *restrict outb)
@@ -449,9 +454,9 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
if (!c) goto ilseq;
break;
default:
- if (c < 128+type) break;
+ if (!c) break;
c = legacy_map(map, c);
- if (c==1) goto ilseq;
+ if (!c) goto ilseq;
}
switch (totype) {
@@ -475,14 +480,14 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
if (c > 0x7f) subst: x++, c='*';
default:
if (*outb < 1) goto toobig;
- if (c < 128+totype || (c<256 && c==legacy_map(tomap, c))) {
+ if (c<256 && c==legacy_map(tomap, c)) {
revout:
*(*out)++ = c;
*outb -= 1;
break;
}
d = c;
- for (c=128+totype; c<256; c++) {
+ for (c=4*totype; c<256; c++) {
if (d == legacy_map(tomap, c)) {
goto revout;
}
diff --git a/src/locale/legacychars.h b/src/locale/legacychars.h
index 914ad0d5..9639b4af 100644
--- a/src/locale/legacychars.h
+++ b/src/locale/legacychars.h
@@ -1,41 +1,40 @@
-0,1,160,167,168,169,175,176,178,183,184,198,215,216,230,247,248,162,163,165,
-196,197,198,199,201,214,215,216,220,224,226,228,229,230,231,232,233,234,235,
-236,238,239,242,244,246,248,249,251,252,255,256,257,258,259,260,261,262,263,
-264,265,266,267,268,269,270,271,272,273,274,275,278,279,280,281,282,283,284,
-285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,302,303,304,305,
-308,309,310,311,312,313,314,315,316,317,318,321,322,323,324,325,326,327,328,
-330,331,332,333,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,
-351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,
-370,371,372,373,374,375,376,377,378,379,380,381,382,402,416,417,431,432,536,
-537,538,539,710,711,728,729,731,732,733,768,769,771,777,803,890,900,901,902,
-904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,
-925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,
-945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,
-964,965,966,967,968,969,970,
-971,972,973,974,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,
-1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,
-1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,
-1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,
-1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,
-1098,1099,1100,1101,1102,1103,1105,1106,1107,1108,1109,1110,1111,1112,1113,
-1114,1115,1116,1118,1119,1168,1169,1456,1457,1458,1459,1460,1461,1462,1463,
-1464,1465,1467,1468,1469,1470,1471,1472,1473,1474,1475,1488,1489,1490,1491,
-1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,
-1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1548,1563,
-1567,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,
-1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1600,1601,1602,
-1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,
-1618,1657,1662,1670,1672,1681,1688,1705,1711,1722,1726,1729,1746,3585,3586,
-3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,
-3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,
-3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,
-3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,3647,3648,3649,3650,
-3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,
-3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,7682,7683,7690,7691,7710,
-7711,7744,7745,7766,7767,7776,7777,7786,7787,7808,7809,7810,7811,7812,7813,
-7922,7923,8204,8205,8206,8207,8211,8212,8213,8215,8216,8217,8218,8220,8221,
-8222,8224,8225,8226,8230,8240,8249,8250,8362,8363,8364,8367,8359,8470,8482,
-8729,8730,8776,8804,8805,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,
+256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,
+275,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,
+296,297,298,299,302,303,304,305,308,309,310,311,312,313,314,315,316,317,318,
+321,322,323,324,325,326,327,328,330,331,332,333,336,337,338,339,340,341,342,
+343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,
+362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,
+381,382,402,416,417,431,432,536,537,538,539,710,711,728,729,731,732,733,768,
+769,771,777,803,890,900,901,902,904,905,906,908,910,911,912,913,914,915,916,
+917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,
+937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,
+956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,
+1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1038,1039,1040,
+1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,
+1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,
+1071,
+1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,
+1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,
+1102,1103,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1118,
+1119,1168,1169,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1467,1468,
+1469,1470,1471,1472,1473,1474,1475,1488,1489,1490,1491,1492,1493,1494,1495,
+1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,
+1511,1512,1513,1514,1520,1521,1522,1523,1524,1548,1563,1567,1569,1570,1571,
+1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,
+1587,1588,1589,1590,1591,1592,1593,1594,1600,1601,1602,1603,1604,1605,1606,
+1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1657,1662,1670,
+1672,1681,1688,1705,1711,1722,1726,1729,1746,3585,3586,3587,3588,3589,3590,
+3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,
+3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,
+3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,
+3636,3637,3638,3639,3640,3641,3642,3647,3648,3649,3650,3651,3652,3653,3654,
+3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,
+3670,3671,3672,3673,3674,3675,7682,7683,7690,7691,7710,7711,7744,7745,7766,
+7767,
+7776,7777,7786,7787,7808,7809,7810,7811,7812,7813,7922,7923,8204,8205,8206,
+8207,8211,8212,8213,8215,8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,
+8240,8249,8250,8319,8359,8362,8363,8364,8367,8470,8482,8729,8730,8734,8745,
+8776,8801,8804,8805,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,
9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,
9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,
9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,