CharacterEncoder.st
changeset 16054 171c7f8b4547
parent 15966 72f3e3a9ba29
child 16522 36f64d703785
--- a/CharacterEncoder.st	Mon Feb 17 15:25:58 2014 +0100
+++ b/CharacterEncoder.st	Mon Feb 17 15:30:39 2014 +0100
@@ -144,8 +144,6 @@
 
     In order to add another coder (for example: for EBCDIC or ms-codePage 278),
     perform the following steps:
-        - create a private subclass of CharacterEncoder named (for example) CP267.
-
         - create a public subclass of CharacterEncoderImplementations::CharacterEncoderImplementation named (for example) CharacterEncoderImplementations::CP267.
 
         - define the mappingURL1_relativeName (if the table is found on 'www.unicode.org')
@@ -155,7 +153,7 @@
 
           In this example, the table from 'std.dkuug.dk' is used, and named 'EBCDIC-CP-FI' there.
 
-        - generate code by evaluating:
+        - generate code by evaluating (make sure that CharacterEncoderGenerator is loaded from stx:goodies):
             CharacterEncoder::CP267 generateCode
 
     Thats all !!
@@ -223,8 +221,8 @@
         ifAbsent:[
             "/ proceed to ignore this error in the future.    
 
-            (EncodersByName at:#unicode) at:encodingNameSymbol put:NullEncoderInstance. 
-            (EncoderClassesByName at:#unicode) at:encodingNameSymbol put:NullEncoder.    
+"/            (EncodersByName at:#unicode) at:encodingNameSymbol put:NullEncoderInstance. 
+"/            (EncoderClassesByName at:#unicode) at:encodingNameSymbol put:NullEncoder.    
 
             "/ self error:'no encoder for ' , encodingNameSymbol mayProceed:true.
             ('CharacterEncoder [warning]: no encoder for ' , encodingNameSymbol) infoPrintCR.
@@ -268,7 +266,7 @@
     encodingNameSymbol := encodingNameSymbolArg.
     encodingNameSymbol isNil ifTrue:[ ^ NullEncoderInstance].
 
-    encodingNameSymbol == #'iso10646-1' ifTrue:[ encodingNameSymbol := #unicode].
+    encodingNameSymbol = 'iso10646-1' ifTrue:[ encodingNameSymbol := #unicode].
 
     lcName := encodingNameSymbol asLowercase.
     name := lcName asSymbolIfInterned.
@@ -573,7 +571,9 @@
 
         (EBCDIC             unicode     ( 'ebcdic' ))
 
-        (GB2313_1980        unicode     ( 'gb2313' 'gb2313-1980' ))
+"/        (GB2313_1980        unicode     ( 'gb2313' 'gb2313-1980' ))
+
+        (GB2312_1980_0      unicode     ( 'gb2312' 'gb2312.1980' 'gb2312.1980-0'))
 
         (HANGUL             unicode     ( 'hangul' ))
 
@@ -1683,11 +1683,11 @@
 !CharacterEncoder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoder.st,v 1.124 2014-02-05 17:19:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoder.st,v 1.125 2014-02-17 14:30:39 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoder.st,v 1.124 2014-02-05 17:19:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoder.st,v 1.125 2014-02-17 14:30:39 cg Exp $'
 ! !