From 5caed717f2aa16898ebddd7ab4a703995490f07d Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 13 Jun 2008 07:34:18 +0000 Subject: Reduce memory footprint of encoding routines and fix an iso-0201 problem. --- encoding_jis.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'encoding_jis.js') diff --git a/encoding_jis.js b/encoding_jis.js index 7550c7b..1858312 100644 --- a/encoding_jis.js +++ b/encoding_jis.js @@ -2,8 +2,8 @@ // for codes 0x2121 - 0x2840 and 0x3021 - 0x7426 // // The unicode codes in second table have been normalized by -// the amount of 19968 to save 5kBytes in this script, so the -// actual value is 19968 + enc_jis_0208_1[ x ] +// the amount of 0x4e00 to save 5kBytes in this script, so the +// actual value is 0x4e00 + enc_jis_0208_1[ x ] var page = { us_ascii : 0, @@ -69,7 +69,7 @@ function decode_jis( str ) { } var enc_jis_0201 = -[65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,165,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,8254,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65377,65378,65379,65380,65381,65382,65383,65384,65385,65386,65387,65388,65389,65390,65391,65392,65393,65394,65395,65396,65397,65398,65399,65400,65401,65402,65403,65404,65405,65406,65407,65408,65409,65410,65411,65412,65413,65414,65415,65416,65417,65418,65419,65420,65421,65422,65423,65424,65425,65426,65427,65428,65429,65430,65431,65432,65433,65434,65435,65436,65437,65438,65439]; +[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,165,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,8254,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65533,65377,65378,65379,65380,65381,65382,65383,65384,65385,65386,65387,65388,65389,65390,65391,65392,65393,65394,65395,65396,65397,65398,65399,65400,65401,65402,65403,65404,65405,65406,65407,65408,65409,65410,65411,65412,65413,65414,65415,65416,65417,65418,65419,65420,65421,65422,65423,65424,65425,65426,65427,65428,65429,65430,65431,65432,65433,65434,65435,65436,65437,65438,65439]; var enc_jis_0208_0 = [12288,12289,12290,65292,65294,12539,65306,65307,65311,65281,12443,12444,180,65344,168,65342,65507,65343,12541,12542,12445,12446,12291,20189,12293, -- cgit v1.2.3