author | Claus Gittinger <cg@exept.de> |
Tue, 25 Jun 2019 14:28:51 +0200 | |
changeset 5050 | 44fa8672d102 |
parent 4135 | 16a9f3bf9327 |
permissions | -rw-r--r-- |
543 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
4135 | 12 |
"{ Package: 'stx:libbasic2' }" |
543 | 13 |
|
4135 | 14 |
"{ NameSpace: Smalltalk }" |
1426 | 15 |
|
16 |
TwoByteString variableWordSubclass:#BIG5EncodedString |
|
229 | 17 |
instanceVariableNames:'' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Collections-Text' |
|
21 |
! |
|
22 |
||
23 |
!BIG5EncodedString class methodsFor:'documentation'! |
|
24 |
||
543 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
||
38 |
! |
|
39 |
||
229 | 40 |
documentation |
41 |
" |
|
1426 | 42 |
OBSOLETE |
43 |
this class will vanish - its functionality has been replaced |
|
44 |
by the UnicodeString classes. |
|
45 |
||
229 | 46 |
BIG5EncodedString represents 16bit strings encoded in BIG-5. |
47 |
BIG-5 is a popular hanzi code used in Taiwan. |
|
261 | 48 |
|
49 |
[author:] |
|
50 |
Claus Gittinger |
|
51 |
||
52 |
[see also:] |
|
4135 | 53 |
Unicode16String |
261 | 54 |
GBEncodedString JISEncodedString |
55 |
TwoByteString String CharacterArray |
|
56 |
StringCollection |
|
229 | 57 |
" |
58 |
! ! |
|
59 |
||
260
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
60 |
!BIG5EncodedString class methodsFor:'initialization'! |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
61 |
|
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
62 |
initialize |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
63 |
"initialize the class - private" |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
64 |
|
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
65 |
self flags:(Behavior flagWords) |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
66 |
|
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
67 |
" |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
68 |
BIG5EncodedString initialize |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
69 |
" |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
70 |
|
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
71 |
"Created: 27.4.1996 / 13:12:30 / cg" |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
72 |
! ! |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
73 |
|
231
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
74 |
!BIG5EncodedString class methodsFor:'code tables'! |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
75 |
|
543 | 76 |
romanTable |
231
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
77 |
"return a table to decode from roman ascii to 16 bit BIG5. |
265 | 78 |
This is experimental - possibly unfinished or incorrect" |
231
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
79 |
|
544 | 80 |
^ #( " " "excla" " # " " $ " " % " " & " " ' " |
81 |
16ra1bc 16ra149 16ra1b2 16ra1ad 16ra243 16ra248 16ra1ae 16ra1ac |
|
231
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
82 |
" ( " " ) " " * " " + " " , " " - " " . " " / " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
83 |
16ra15d 16ra15e 16ra1ce 16ra1cf 16ra14d 16ra1df 16ra14f 16ra1fe |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
84 |
" 0 " " 1 " " 2 " " 3 " " 4 " " 5 " " 6 " " 7 " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
85 |
16ra2af 16ra2b0 16ra2b1 16ra2b2 16ra2b3 16ra2b4 16ra2b5 16ra2b6 |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
86 |
" 8 " " 9 " " : " " ; " " < " " = " " > " " ? " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
87 |
16ra2b7 16ra2b8 16ra152 16ra151 16ra1e0 16ra1e2 16ra1e1 16ra148 |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
88 |
" @ " " A " " B " " C " " D " " E " " F " " G " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
89 |
16ra249 16ra2cf 16ra2d0 16ra2d1 16ra2d2 16ra2d3 16ra2d4 16ra2d5 |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
90 |
" H " " I " " J " " K " " L " " M " " N " " O " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
91 |
16ra2d6 16ra2d7 16ra2d8 16ra2d9 16ra2da 16ra2db 16ra2dc 16ra2dd |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
92 |
" P " " Q " " R " " S " " T " " U " " V " " W " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
93 |
16ra2de 16ra2df 16ra2e0 16ra2e1 16ra2e2 16ra2e3 16ra2e4 16ra2e5 |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
94 |
" X " " Y " " Z " " [ " " \ " " ] " " ^ " " _ " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
95 |
16ra2e6 16ra2e7 16ra2e8 16ra169 16ra242 16ra16a 16ra173 16ra15a |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
96 |
" ` " " a " " b " " c " " d " " e " " f " " g " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
97 |
16ra1ab 16ra2e9 16ra2ea 16ra2eb 16ra2ec 16ra2ed 16ra2ee 16ra2ef |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
98 |
" h " " i " " j " " k " " l " " m " " n " " o " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
99 |
16ra2f0 16ra2f1 16ra2f2 16ra2f3 16ra2f4 16ra2f5 16ra2f6 16ra2f7 |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
100 |
" p " " q " " r " " s " " t " " u " " v " " w " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
101 |
16ra2f8 16ra2f9 16ra2fa 16ra2fb 16ra2fc 16ra2fd 16ra2fe 16ra340 |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
102 |
" x " " y " " z " " { " " | " " } " " ~ " |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
103 |
16ra341 16ra342 16ra343 16ra161 16ra157 16ra162 16ra1e3 16ra1bd |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
104 |
|
544 | 105 |
"/ 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc |
106 |
"/ 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc |
|
107 |
"/ 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc |
|
108 |
"/ 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc |
|
109 |
"/ 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc |
|
110 |
"/ 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc |
|
111 |
"/ 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc |
|
112 |
"/ 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc 16ra1bc |
|
113 |
). |
|
231
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
114 |
|
543 | 115 |
"Created: 30.6.1997 / 14:26:26 / cg" |
544 | 116 |
"Modified: 30.6.1997 / 18:22:30 / cg" |
231
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
117 |
! ! |
5d28780c8859
code table moved to BIG5EncodedString
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
118 |
|
229 | 119 |
!BIG5EncodedString methodsFor:'queries'! |
120 |
||
121 |
encoding |
|
264 | 122 |
"return the strings encoding as a symbol. |
123 |
Here, the constant symbol #big5 is returned." |
|
240 | 124 |
|
229 | 125 |
^ #big5 |
126 |
||
127 |
"Created: 17.4.1996 / 15:41:15 / cg" |
|
264 | 128 |
"Modified: 27.4.1996 / 13:23:01 / cg" |
229 | 129 |
! ! |
130 |
||
131 |
!BIG5EncodedString class methodsFor:'documentation'! |
|
132 |
||
133 |
version |
|
4135 | 134 |
^ '$Header$' |
229 | 135 |
! ! |
1426 | 136 |
|
4135 | 137 |
|
260
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
240
diff
changeset
|
138 |
BIG5EncodedString initialize! |