author | Claus Gittinger <cg@exept.de> |
Sat, 27 Apr 1996 13:24:41 +0200 | |
changeset 264 | 1e508408ecf5 |
parent 262 | 1d0e8b654573 |
child 449 | 25bc9f97233e |
permissions | -rw-r--r-- |
195 | 1 |
" |
201
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
195 | 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 |
" |
|
12 |
||
13 |
TwoByteString subclass:#JISEncodedString |
|
14 |
instanceVariableNames:'' |
|
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Collections-Text' |
|
18 |
! |
|
19 |
||
20 |
!JISEncodedString class methodsFor:'documentation'! |
|
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
230
aef7afe6a01d
no need for initialize method
Claus Gittinger <cg@exept.de>
parents:
202
diff
changeset
|
38 |
JISEncodedString represents 16bit strings encoded in JIS. |
262 | 39 |
You need jis-encoded fonts on your display workstation, |
40 |
to display them (i.e. when switching to japanese ...). |
|
41 |
||
195 | 42 |
Most of you are probably not interrested in those ... |
253 | 43 |
|
44 |
[author:] |
|
45 |
Claus Gittinger |
|
262 | 46 |
|
47 |
[see also:] |
|
48 |
BIG5EncodedString GBEncodedString |
|
49 |
TwoByteString String CharacterArray |
|
50 |
StringCollection |
|
195 | 51 |
" |
241 | 52 |
! |
53 |
||
54 |
examples |
|
55 |
" |
|
56 |
JISEncodedString fromString:'hello world' |
|
57 |
||
58 |
'hello world' decodeFrom:#jis7 |
|
59 |
||
60 |
<someStringWithJIS7Escapes> decodeFrom:#jis7 |
|
61 |
" |
|
195 | 62 |
! ! |
63 |
||
260
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
64 |
!JISEncodedString class methodsFor:'initialization'! |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
65 |
|
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
66 |
initialize |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
67 |
"initialize the class - private" |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
68 |
|
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
69 |
self flags:(Behavior flagWords) |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
70 |
|
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
71 |
" |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
72 |
JISEncodedString initialize |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
73 |
" |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
74 |
|
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
75 |
"Created: 27.4.1996 / 13:12:02 / cg" |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
76 |
! ! |
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
77 |
|
201
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
78 |
!JISEncodedString class methodsFor:'code tables'! |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
79 |
|
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
80 |
romanJISDecoderTable |
241 | 81 |
"return a table to decode from roman ascii to 16 bit JIS." |
201
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
82 |
|
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
83 |
^ #( |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
84 |
16r212a 16r2149 16r2174 16r2170 16r2173 16r2175 16r2147 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
85 |
16r214a 16r214b 16r2176 16r215c 16r2124 16r215d 16r2125 16r213f |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
86 |
16r2330 16r2331 16r2332 16r2333 16r2334 16r2335 16r2336 16r2337 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
87 |
16r2338 16r2339 16r2127 16r2128 16r2163 16r2161 16r2164 16r2129 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
88 |
16r2177 16r2341 16r2342 16r2343 16r2344 16r2345 16r2346 16r2347 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
89 |
16r2348 16r2349 16r234a 16r234b 16r234c 16r234d 16r234e 16r234f |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
90 |
16r2350 16r2351 16r2352 16r2353 16r2354 16r2355 16r2356 16r2357 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
91 |
16r2358 16r2359 16r235a 16r214e 16r2140 16r214f 16r2130 16r2132 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
92 |
16r2146 16r2361 16r2362 16r2363 16r2364 16r2365 16r2366 16r2367 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
93 |
16r2368 16r2369 16r236a 16r236b 16r236c 16r236d 16r236e 16r236f |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
94 |
16r2370 16r2371 16r2372 16r2373 16r2374 16r2375 16r2376 16r2377 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
95 |
16r2378 16r2379 16r237a 16r2150 16r2143 16r2151 16r2141 16r2121 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
96 |
16r2121 16r2123 16r2156 16r2157 16r2122 16r2126 16r2572 16r2521 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
97 |
16r2523 16r2525 16r2527 16r2529 16r2563 16r2565 16r2567 16r2543 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
98 |
16r213c 16r2522 16r2524 16r2526 16r2528 16r252a 16r252b 16r252d |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
99 |
16r252f 16r2531 16r2533 16r2535 16r2537 16r2539 16r253b 16r253d |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
100 |
16r253f 16r2541 16r2544 16r2546 16r2548 16r254a 16r254b 16r254c |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
101 |
16r254d 16r254e 16r254f 16r2552 16r2555 16r2558 16r255b 16r255e |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
102 |
16r255f 16r2560 16r2561 16r2562 16r2564 16r2566 16r2568 16r2569 |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
103 |
16r256a 16r256b 16r256c 16r256d 16r256f 16r2573 16r212b 16r212c ). |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
104 |
|
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
105 |
"Created: 26.2.1996 / 17:52:19 / cg" |
241 | 106 |
"Modified: 22.4.1996 / 16:09:12 / cg" |
201
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
107 |
! ! |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
108 |
|
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
109 |
!JISEncodedString class methodsFor:'standards'! |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
110 |
|
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
111 |
jis7KanjiEscapeSequence |
241 | 112 |
"return the escape sequence used to switch to kanji in jis7 encoded strings" |
113 |
||
201
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
114 |
^ Character esc asString , '$B'. |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
115 |
|
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
116 |
"Created: 26.2.1996 / 17:38:08 / cg" |
241 | 117 |
"Modified: 22.4.1996 / 16:08:35 / cg" |
201
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
118 |
! |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
119 |
|
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
120 |
jis7RomanEscapeSequence |
241 | 121 |
"return the escape sequence used to switch to roman in jis7 encoded strings" |
122 |
||
201
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
123 |
^ Character esc asString , '(J'. |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
124 |
|
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
125 |
"Created: 26.2.1996 / 17:38:03 / cg" |
241 | 126 |
"Modified: 22.4.1996 / 16:08:42 / cg" |
202 | 127 |
! |
128 |
||
129 |
oldJis7KanjiEscapeSequence |
|
241 | 130 |
"return the escape sequence used to switch to kanji in |
131 |
old jis7 encoded strings" |
|
132 |
||
202 | 133 |
^ Character esc asString , '$@'. |
134 |
||
135 |
"Created: 26.2.1996 / 21:53:18 / cg" |
|
241 | 136 |
"Modified: 22.4.1996 / 16:08:53 / cg" |
201
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
137 |
! ! |
f93cf3d2cb61
knowledge about coding sequences moved to JISEncodedString
Claus Gittinger <cg@exept.de>
parents:
197
diff
changeset
|
138 |
|
195 | 139 |
!JISEncodedString methodsFor:'queries'! |
140 |
||
141 |
encoding |
|
264 | 142 |
"return the strings encoding as a symbol. |
143 |
Here, the constant symbol #jis is returned." |
|
240 | 144 |
|
195 | 145 |
^ #jis |
240 | 146 |
|
264 | 147 |
"Modified: 27.4.1996 / 13:23:16 / cg" |
195 | 148 |
! ! |
149 |
||
150 |
!JISEncodedString class methodsFor:'documentation'! |
|
151 |
||
152 |
version |
|
264 | 153 |
^ '$Header: /cvs/stx/stx/libbasic2/Attic/JISString.st,v 1.11 1996-04-27 11:24:32 cg Exp $' |
195 | 154 |
! ! |
260
427397326fac
need explicit #initialize (due to startup optimization)
Claus Gittinger <cg@exept.de>
parents:
253
diff
changeset
|
155 |
JISEncodedString initialize! |