CharacterArray.st
changeset 1250 0f628432aa93
parent 1241 431675180b54
child 1252 105280fd8d72
equal deleted inserted replaced
1249:2d5d0edd3359 1250:0f628432aa93
   138 decoderTableFor:encoding
   138 decoderTableFor:encoding
   139     "return a table to decode from an alien encoding into
   139     "return a table to decode from an alien encoding into
   140      the internal (iso8859, ansi) format.
   140      the internal (iso8859, ansi) format.
   141      This is an experimental interface - unfinished"
   141      This is an experimental interface - unfinished"
   142 
   142 
   143     |table|
   143     |table unrepresentableCharacterCode x80Table|
   144 
   144 
   145     DecoderTables notNil ifTrue:[
   145     DecoderTables notNil ifTrue:[
   146         table := DecoderTables at:encoding ifAbsent:nil.
   146         table := DecoderTables at:encoding ifAbsent:nil.
   147         table notNil ifTrue:[^ table].
   147         table notNil ifTrue:[^ table].
   148     ] ifFalse:[
   148     ] ifFalse:[
   149         DecoderTables := IdentityDictionary new
   149         DecoderTables := IdentityDictionary new
   150     ].
   150     ].
   151 
   151 
   152 
   152 
       
   153     unrepresentableCharacterCode := 16rBF.
       
   154 
       
   155     "/
       
   156     "/ setup as identityTranslation
       
   157     "/
   153     table := (0 to:255) asByteArray.
   158     table := (0 to:255) asByteArray.
       
   159 
   154     "/
   160     "/
   155     "/ mac -> iso8859
   161     "/ mac -> iso8859
   156     "/
   162     "/
       
   163     "/ You will loose the following characters:
       
   164     "/ - all of them will be replaced by 8F (¿)
       
   165     "/
       
   166     "/  A0 (cross)
       
   167     "/  A5 (dot-dot)
       
   168     "/  AA (tm - trademark)
       
   169     "/  AD (not equal)
       
   170     "/  B0 (infinity)
       
   171     "/  B3 (less-double-equal <=)
       
   172     "/  B4 (greater-equal >-)
       
   173     "/  B6 (math lowercase delta)
       
   174     "/  B7 (math sum)
       
   175     "/  B8 (math uppercase pi)
       
   176     "/  B9 (math lowercase pi)
       
   177     "/  BA (math integral)
       
   178     "/  BD (math omega)
       
   179     "/  C3 (math union)
       
   180     "/  C4 (ext latin f)
       
   181     "/  C5 (math almost equal)
       
   182     "/  C6 (math uppercase delta)
       
   183     "/  C9 (dot-dot-dot)
       
   184     "/  CE (OE ligature)
       
   185     "/  CF (oe ligature)
       
   186     "/  D1 (hyphen)
       
   187     "/  D2 (opening top dquote)
       
   188     "/  D3 (closing top dquote)
       
   189     "/  D4 (opening top quote)
       
   190     "/  D5 (closing top quote)
       
   191     "/  D7 (geometric: )
       
   192     "/  D9 (uppercase Y diacrit )
       
   193     "/  DA (slash2 )
       
   194     "/  DC (single oldStyle opening quote (<) )
       
   195     "/  DD (single oldStyle closing quote (>) )
       
   196     "/  DE (? )
       
   197     "/  DF (? )
       
   198     "/  E0 (double cross )
       
   199     "/  E2 (opening bottom quote )
       
   200     "/  E3 (opening bottom dquote )
       
   201     "/  F0 (? )
       
   202     "/  F5 (latin l )
       
   203     "/  F6 (diacrit circumflex)
       
   204     "/  F7 (diacrit tilde)
       
   205     "/  F8 (diacrit top line)
       
   206     "/  F9 (diacrit inverse circumflex)
       
   207     "/  FA (diacrit dot)
       
   208     "/  FB (diacrit ring)
       
   209     "/  FC (diacrit cedille left)
       
   210     "/  FD (diacrit dquote)
       
   211     "/  FE (diacrit cedille right)
       
   212     "/  FF (diacrit circumflex2 ?)
       
   213     "/   
   157     encoding == #mac ifTrue:[
   214     encoding == #mac ifTrue:[
   158         table at:8r232+1 put:246. "/ german umlaut o (mac: 154; 8859: 246)
   215         x80Table :=
   159         table at:8r212+1 put:228. "/ german umlaut a (mac: 138; 8859: 228)
   216             #( 16r00c4 16r00c5 16r00c7 16r00c9 16r00d1 16r00d6 16r00dc 16r00e1  "/ 80
   160         table at:8r237+1 put:252. "/ german umlaut u (mac: 159; 8859: 252)
   217                16r00e0 16r00e2 16r00e4 16r00e3 16r00e5 16r00e7 16r00e9 16r00e8
   161         table at:8r206+1 put:220. "/ german umlaut U (mac: 134; 8859: 220)
   218 
   162         "/ more needed here - need info to do it ....
   219                16r00ea 16r00eb 16r00ed 16r00ec 16r00ee 16r00ef 16r00f1 16r00f3  "/ 90
   163     ].
   220                16r00f2 16r00f4 16r00f6 16r00f5 16r00fa 16r00f9 16r00fb 16r00fc
       
   221 
       
   222                16rFFFF 16r00b0 16r00a2 16r00a3 16r00a7 16rFFFF 16r00b6 16r00df  "/ a0
       
   223                16r00ae 16r00a9 16rFFFF 16r00b4 16r00a8 16rFFFF 16r00c6 16r00d8
       
   224 
       
   225                16rFFFF 16r00b1 16rFFFF 16rFFFF 16r00a5 16r00b5 16rFFFF 16rFFFF  "/ b0
       
   226                16rFFFF 16rFFFF 16rFFFF 16r00aa 16r00ba 16rFFFF 16r00e6 16r00f8
       
   227 
       
   228                16r00bf 16r00a1 16r00ac 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16r00ab  "/ c0
       
   229                16r00bb 16rFFFF 16r00a0 16r00c1 16r00c3 16r00d5 16rFFFF 16rFFFF
       
   230 
       
   231                16r00ad 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16r00f7 16rFFFF  "/ d0
       
   232                16rFFFF 16rFFFF 16rFFFF 16r00a4 16rFFFF 16rFFFF 16rFFFF 16rFFFF
       
   233 
       
   234                16rFFFF 16r00b7 16rFFFF 16rFFFF 16rFFFF 16r00c2 16r00ca 16r00c1  "/ e0
       
   235                16r00cb 16r00c8 16r00cd 16r00ce 16r00cf 16r00cc 16r00d3 16r00d4
       
   236 
       
   237                16rFFFF 16r00d2 16r00da 16r00db 16r00d9 16rFFFF 16rFFFF 16rFFFF  "/ f0
       
   238                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF
       
   239             ).
       
   240     ].
       
   241 
       
   242     "/
       
   243     "/ next -> iso8859
       
   244     "/
       
   245     "/ You will loose the following characters:
       
   246     "/ - all of them will be replaced by 8F (¿) 
       
   247     "/
       
   248     "/  A4 (diacrit /)
       
   249     "/  A9 (diacrit quote)
       
   250     "/  AA (top opening dquote)
       
   251     "/  AC (single oldStyle opening quote (<))
       
   252     "/  AD (single oldStyle closing quote (>))
       
   253     "/  AE (?)
       
   254     "/  AF (?)
       
   255     "/  B2 (cross)
       
   256     "/  B3 (double cross)
       
   257     "/  B7 (enter dot)
       
   258     "/  B8 (opening bottom quote)
       
   259     "/  B9 (opening bottom dquote)
       
   260     "/  BA (closing top dquote)
       
   261     "/  BC (dot-dot-dot)
       
   262     "/  BD (per-mille)
       
   263     "/  C0 (subscript 1)
       
   264     "/  C1 (accent grave)
       
   265     "/  C2 (accent degu)
       
   266     "/  C3 (accent circonflex)
       
   267     "/  C4 (accent tilde)
       
   268     "/  C5 (accent line)
       
   269     "/  C6 (accent circonflex reverse)
       
   270     "/  C7 (accent dot)
       
   271     "/  C8 (accent dot-dot)
       
   272     "/  D0 (hline)
       
   273     "/  E8 (engl. pound upper case L)
       
   274     "/  EA (OE ligature)
       
   275     "/  F5 (latin l)
       
   276     "/  F8 (engl. pound lower case l)
       
   277     "/  FE (?)
       
   278     "/  FF (?)
       
   279     "/
       
   280     encoding == #next ifTrue:[
       
   281         unrepresentableCharacterCode := 16rBF.
       
   282 
       
   283         x80Table :=
       
   284             #( 16r0080 16r00c0 16r00c1 16r00c2 16r00c3 16r00c4 16r00c5 16r00c7  "/ 80
       
   285                16r00c8 16r00c9 16r00ca 16r00cb 16r00cc 16r00cd 16r00ce 16r00cf
       
   286 
       
   287                16r00d0 16r00d1 16r00d2 16r00d3 16r00d4 16r00d5 16r00d6 16r00d9  "/ 90
       
   288                16r00da 16r00db 16r00dc 16r00dd 16r00de 16r00b5 16r00d7 16r00f7
       
   289 
       
   290                16r00a9 16r00a1 16r00a2 16r00a3 16rFFFF 16r00a5 16rFFFF 16r00a7  "/ a0
       
   291                16r00a4 16rFFFF 16rFFFF 16r00ab 16rFFFF 16rFFFF 16rFFFF 16rFFFF
       
   292 
       
   293                16r00ae 16r00ad 16rFFFF 16rFFFF 16r00b7 16r00a6 16r00b6 16rFFFF  "/ b0
       
   294                16rFFFF 16rFFFF 16rFFFF 16r00bb 16rFFFF 16rFFFF 16r00ac 16r00bf
       
   295 
       
   296                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF  "/ c0
       
   297                16rFFFF 16r00b2 16r00b0 16r00b8 16r00b3 16rFFFF 16rFFFF 16rFFFF
       
   298 
       
   299                16rFFFF 16r00b1 16r00bc 16r00bd 16r00be 16r00e0 16r00e1 16r00e2  "/ d0
       
   300                16r00e3 16r00e4 16r00e5 16r00e7 16r00e8 16r00e9 16r00ea 16r00eb
       
   301 
       
   302                16r00ec 16r00c6 16r00ed 16r00aa 16r00ee 16r00ef 16r00f0 16r00f1  "/ e0
       
   303                16rFFFF 16r00d8 16rFFFF 16r00ba 16r00f2 16r00f3 16r00f4 16r00f5
       
   304 
       
   305                16r00f6 16r00e6 16r00f9 16r00fa 16r00fb 16rFFFF 16r00fc 16r00fd  "/ f0
       
   306                16rFFFF 16r00f8 16rFFFF 16r00df 16r00fe 16r00ff 16rFFFF 16rFFFF
       
   307             ).
       
   308     ].
       
   309 
   164     "/
   310     "/
   165     "/ postscript -> iso8859
   311     "/ postscript -> iso8859
   166     "/
   312     "/
   167     encoding == #postscript ifTrue:[
   313     encoding == #postscript ifTrue:[
   168         table at:8r224+1 put:246. "/ german umlaut o (ps: 148; 8859: 246)
   314         table at:8r224+1 put:246. "/ german umlaut o (ps: 148; 8859: 246)
   171         table at:8r231+1 put:214. "/ german umlaut O (ps: 153; 8859: 214)
   317         table at:8r231+1 put:214. "/ german umlaut O (ps: 153; 8859: 214)
   172         table at:8r216+1 put:196. "/ german umlaut A (ps: 142; 8859: 196)
   318         table at:8r216+1 put:196. "/ german umlaut A (ps: 142; 8859: 196)
   173         table at:8r232+1 put:220. "/ german umlaut U (ps: 154; 8859: 220)
   319         table at:8r232+1 put:220. "/ german umlaut U (ps: 154; 8859: 220)
   174         "/ more needed here - need info to do it ....
   320         "/ more needed here - need info to do it ....
   175     ].
   321     ].
       
   322 
   176     "/
   323     "/
   177     "/ msdos -> iso8859
   324     "/ msdos (codePage 437) -> iso8859
       
   325     "/
       
   326     "/
       
   327     "/ You will loose the following characters:
       
   328     "/ - all of them will be replaced by 8F (¿) 
       
   329     "/
       
   330     "/  9E      (pesetas)
       
   331     "/  9F      (latin f)
       
   332     "/  A9      (technical not)
       
   333     "/  B0 - BF (block graphic)
       
   334     "/  C0 - CF (block graphic)
       
   335     "/  D0 - DF (block graphic)
       
   336     "/  E0      (greek alpha)
       
   337     "/  E2 - E5 (greek)
       
   338     "/  E7 - EC (greek & math)
       
   339     "/  EE - EF (greek & math)
       
   340     "/  F0      (math)
       
   341     "/  F2 - F5 (math & technical)
       
   342     "/  F7      (math)
       
   343     "/  F9      (center dot)
       
   344     "/  FB      (math sqrt)
       
   345     "/  FC      (super n)
       
   346     "/  FE      (block)
   178     "/
   347     "/
   179     encoding == #msdos ifTrue:[
   348     encoding == #msdos ifTrue:[
   180         table at:16r82+1 put:16re9. "/ french e degu    (dos: 82; 8859: e9)
   349         unrepresentableCharacterCode := 16rBF.
   181         table at:16r8a+1 put:16re8. "/ french e graph   (dos: 8a; 8859: e8)
   350 
   182         table at:16r88+1 put:16rea. "/ french e circ.   (dos: 88; 8859: ea)
   351         x80Table :=
   183         table at:16r8c+1 put:16ree. "/ french u circ.   (dos: 8c; 8859: ee)
   352             #( 16r00c7 16r00fc 16r00e9 16r00e2 16r00e4 16r00e0 16r00e5 16r00e7  "/ 80
   184         table at:16r87+1 put:16re7. "/ french c cedille (dos: 87; 8859: e7)
   353                16r00ea 16r00eb 16r00e8 16r00ef 16r00ee 16r00ec 16r00c4 16r00c5
   185         table at:16r85+1 put:16re0. "/ french a degu    (dos: 85; 8859: e0)
   354 
   186 
   355                16r00c9 16r00e6 16r00c6 16r00f4 16r00f6 16r00f2 16r00fb 16r00f9  "/ 90
   187 "/        table at:8r224+1 put:246. "/ german umlaut o (ps: 148; 8859: 246)
   356                16r00ff 16r00d6 16r00dc 16r00a2 16r00a3 16r00a5 16rFFFF 16rFFFF
   188 "/        table at:8r204+1 put:228. "/ german umlaut a (ps: 132; 8859: 228)
   357 
   189 "/        table at:8r201+1 put:252. "/ german umlaut u (ps: 129; 8859: 252)
   358                16r00e1 16r00ed 16r00f3 16r00fa 16r00f1 16r00d1 16r00aa 16r00da  "/ a0
   190 "/        table at:8r231+1 put:214. "/ german umlaut O (ps: 153; 8859: 214)
   359                16r00bf 16rFFFF 16r00ac 16r00bd 16r00bc 16r00a1 16r00ab 16r00bb
   191 "/        table at:8r216+1 put:196. "/ german umlaut A (ps: 142; 8859: 196)
   360 
   192 "/        table at:8r232+1 put:220. "/ german umlaut U (ps: 154; 8859: 220)
   361                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF  "/ b0
   193         "/ more needed here - need info to do it ....
   362                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF
       
   363 
       
   364                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF  "/ c0
       
   365                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF
       
   366 
       
   367                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF  "/ d0
       
   368                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF
       
   369 
       
   370                16rFFFF 16r00df 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16r00b5 16rFFFF  "/ e0
       
   371                16rFFFF 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16r00f8 16rFFFF 16rFFFF
       
   372 
       
   373                16rFFFF 16r00b1 16rFFFF 16rFFFF 16rFFFF 16rFFFF 16r00f7 16rFFFF  "/ f0
       
   374                16r00b0 16rFFFF 16r00b7 16rFFFF 16rFFFF 16r00b2 16rFFFF 16r00a0
       
   375             ).
   194     ].
   376     ].
   195     "/ more encodings needed here ....
   377     "/ more encodings needed here ....
       
   378 
       
   379 
       
   380     "/
       
   381     "/ x80Table should contain the translation for
       
   382     "/ 0x80..0xFF characters
       
   383     "/
       
   384     x80Table notNil ifTrue:[
       
   385         x80Table keysAndValuesDo:[:idx :repl |
       
   386             |ch|
       
   387 
       
   388             repl == 16rFFFF ifTrue:[
       
   389                 ch := unrepresentableCharacterCode
       
   390             ] ifFalse:[
       
   391                 ch := repl
       
   392             ].
       
   393             table at:(16r80 + idx) put:ch
       
   394         ].
       
   395     ].
   196 
   396 
   197     DecoderTables at:encoding put:table.
   397     DecoderTables at:encoding put:table.
   198     ^ table
   398     ^ table
   199 
   399 
   200     "
   400     "
   201      DecoderTables := nil
   401      DecoderTables := nil
   202     "
   402     "
   203 
   403 
   204     "Created: 20.10.1995 / 23:04:43 / cg"
   404     "Created: 20.10.1995 / 23:04:43 / cg"
   205     "Modified: 22.2.1996 / 17:19:38 / cg"
   405     "Modified: 22.4.1996 / 15:30:10 / cg"
   206 !
   406 !
   207 
   407 
   208 encoderTableFor:encoding
   408 encoderTableFor:encoding
   209     "return a table to encode from the internal (iso8859, ansi) format
   409     "return a table to encode from the internal (iso8859, ansi) format
   210      into an alien encoding.
   410      into an alien encoding.
   211      This is an experimental interface - unfinished"
   411      This is an experimental interface - unfinished"
   212 
   412 
   213     |table|
   413     |table decoderTable unrepresentableCharacterCode 
       
   414      unrepresentableISOCharacterCode x80Table|
   214 
   415 
   215     EncoderTables notNil ifTrue:[
   416     EncoderTables notNil ifTrue:[
   216         table := EncoderTables at:encoding ifAbsent:nil.
   417         table := EncoderTables at:encoding ifAbsent:nil.
   217         table notNil ifTrue:[^ table].
   418         table notNil ifTrue:[^ table].
   218     ] ifFalse:[
   419     ] ifFalse:[
   219         EncoderTables := IdentityDictionary new
   420         EncoderTables := IdentityDictionary new
   220     ].
   421     ].
   221 
   422 
   222     table := (0 to:255) asByteArray.
       
   223     "/
   423     "/
   224     "/ iso8859 -> mac
   424     "/ iso8859 -> mac
   225     "/
   425     "/
   226     encoding == #mac ifTrue:[
   426     encoding == #mac ifTrue:[
   227         table at:246+1 put:8r232. "/ german umlaut o (mac: 154; 8859: 246)
   427         decoderTable := self decoderTableFor:encoding.
   228         table at:228+1 put:8r212. "/ german umlaut a (mac: 138; 8859: 228)
   428         unrepresentableCharacterCode := 16rFF.
   229         table at:252+1 put:8r237. "/ german umlaut u (mac: 159; 8859: 252)
   429         unrepresentableISOCharacterCode := 16rBF.
   230         table at:220+1 put:8r206. "/ german umlaut U (mac: 134; 8859: 220)
       
   231         "/ more needed here - need info to do it ....
       
   232     ].
   430     ].
   233     "/
   431     "/
   234     "/ iso8859 -> msdos
   432     "/ iso8859 -> msdos
   235     "/
   433     "/
   236     encoding == #msdos ifTrue:[
   434     encoding == #msdos ifTrue:[
   237         table at:233+1 put:8r202. "/ french e accent degu  (dos: 130; 8859: 233)
   435         decoderTable := self decoderTableFor:encoding.
   238         table at:232+1 put:8r212. "/ french e accent graph (dos: 138; 8859: 232)
   436         unrepresentableCharacterCode := 16rFF.
   239         table at:234+1 put:8r210. "/ french e accent circ. (dos: 136; 8859: 234)
   437         unrepresentableISOCharacterCode := 16rBF.
   240         table at:238+1 put:8r214. "/ french u accent circ. (dos: 140; 8859: 238)
   438     ].
   241         table at:231+1 put:8r207. "/ french c cedille      (dos: 135; 8859: 231)
   439 
   242 
       
   243         table at:16re9+1 put:16r82. "/ french e degu    (dos: 82; 8859: e9)
       
   244         table at:16re8+1 put:16r8a. "/ french e graph   (dos: 8a; 8859: e8)
       
   245         table at:16rea+1 put:16r88. "/ french e circ.   (dos: 88; 8859: ea)
       
   246         table at:16ree+1 put:16r8c. "/ french u circ.   (dos: 8c; 8859: ee)
       
   247         table at:16re7+1 put:16r87. "/ french c cedille (dos: 87; 8859: e7)
       
   248         table at:16re0+1 put:16r85. "/ french a degu    (dos: 85; 8859: e0)
       
   249         "/ more needed here - need info to do it ....
       
   250     ].
       
   251     "/ more encodings needed here ....
   440     "/ more encodings needed here ....
   252 
   441 
       
   442     decoderTable notNil ifTrue:[
       
   443         table := Array new:256 withAll:unrepresentableCharacterCode.
       
   444 
       
   445         0 to:16rFF do:[:code |
       
   446             |isoCode destIdex|
       
   447 
       
   448             isoCode := decoderTable at:(code+1).
       
   449             table at:isoCode+1 put:code.
       
   450         ]
       
   451     ].
       
   452 
       
   453     table isNil ifTrue:[
       
   454         "/
       
   455         "/ setup as identityTranslation
       
   456         "/
       
   457         table := (0 to:255) asByteArray.
       
   458     ].
   253 
   459 
   254     EncoderTables at:encoding put:table.
   460     EncoderTables at:encoding put:table.
   255     ^ table
   461     ^ table
   256 
   462 
   257     "
   463     "
   258      EncoderTables := nil
   464      EncoderTables := nil
       
   465      DecoderTables := nil
       
   466      CharacterArray decoderTableFor:#mac
       
   467      CharacterArray encoderTableFor:#mac
   259     "
   468     "
   260 
   469 
   261     "Created: 22.2.1996 / 16:17:58 / cg"
   470     "Created: 22.2.1996 / 16:17:58 / cg"
   262     "Modified: 22.2.1996 / 17:21:13 / cg"
   471     "Modified: 22.4.1996 / 15:42:22 / cg"
   263 !
   472 !
   264 
   473 
   265 supportedEncodings
   474 supportedEncodings
   266     "/ the first row gives the external (names);
   475     "return an array containing symbolic names of supported encodings. 
   267     "/ the second the internally used symbol.
   476      These are internally visible supported ones only"
   268     "/ you may map more than one external name onto the same internal
       
   269 
   477 
   270     ^ #( 
   478     ^ #( 
   271          ('DOS' 'MAC' 'EUC' 'JIS' 'JIS7' 'GB' 'BIG5')
   479          (
   272          (msdos  mac   euc   jis   jis7   gb   big5)
   480           iso8859
       
   481           ascii
       
   482           msdos                   
       
   483           mac         
       
   484           next   
       
   485           euc   
       
   486           jis   
       
   487           jis7   
       
   488           gb   
       
   489           big5)
   273        )
   490        )
   274 
   491 
   275     "Created: 22.2.1996 / 16:19:20 / cg"
   492     "Created: 22.2.1996 / 16:19:20 / cg"
   276     "Modified: 17.4.1996 / 16:18:28 / cg"
   493     "Modified: 22.4.1996 / 14:43:50 / cg"
       
   494 !
       
   495 
       
   496 supportedExternalEncodings
       
   497     "return an array of two arrays containing the names of supported
       
   498      encodings which are supported for external resources (i.e. files).
       
   499      The first array contains user-readable strings (descriptions),
       
   500      the second contains the internally used symbolic names.
       
   501      More than one external name may be mapped onto the same symbolic."
       
   502 
       
   503     ^ #( 
       
   504          (
       
   505           'iso8859 (ansi)'  
       
   506           'msdos (codepage 437)'  
       
   507           'macintosh' 
       
   508           'NEXT' 
       
   509           'EUC (extended unix code)' 
       
   510           'JIS7 (jis 7bit escape codes)'
       
   511           'GB (mainland china hanzi)'
       
   512           'BIG5 (taiwan hanzi)'
       
   513          )
       
   514          (
       
   515           iso8859
       
   516           msdos                   
       
   517           mac         
       
   518           next   
       
   519           euc   
       
   520           jis7   
       
   521           gb   
       
   522           big5)
       
   523        )
       
   524 
       
   525     "Created: 22.4.1996 / 14:39:39 / cg"
       
   526     "Modified: 22.4.1996 / 14:49:34 / cg"
   277 ! !
   527 ! !
   278 
   528 
   279 !CharacterArray class methodsFor:'encoding / decoding'!
   529 !CharacterArray class methodsFor:'encoding / decoding'!
   280 
   530 
   281 decodeFromBIG5:aString
   531 decodeFromBIG5:aString
  3402 ! !
  3652 ! !
  3403 
  3653 
  3404 !CharacterArray class methodsFor:'documentation'!
  3654 !CharacterArray class methodsFor:'documentation'!
  3405 
  3655 
  3406 version
  3656 version
  3407     ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.73 1996-04-20 21:16:54 cg Exp $'
  3657     ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.74 1996-04-22 13:48:18 cg Exp $'
  3408 ! !
  3658 ! !