8903
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2005 by eXept Software AG
|
|
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 |
"{ Package: 'stx:libbasic' }"
|
|
14 |
|
|
15 |
"{ NameSpace: CharacterEncoderImplementations }"
|
|
16 |
|
|
17 |
ISO10646_to_UTF16BE subclass:#ISO10646_to_UTF16LE
|
|
18 |
instanceVariableNames:''
|
|
19 |
classVariableNames:''
|
|
20 |
poolDictionaries:''
|
|
21 |
category:'Collections-Text-Encodings'
|
|
22 |
!
|
|
23 |
|
|
24 |
!ISO10646_to_UTF16LE class methodsFor:'documentation'!
|
|
25 |
|
|
26 |
copyright
|
|
27 |
"
|
|
28 |
COPYRIGHT (c) 2005 by eXept Software AG
|
|
29 |
All Rights Reserved
|
|
30 |
|
|
31 |
This software is furnished under a license and may be used
|
|
32 |
only in accordance with the terms of that license and with the
|
|
33 |
inclusion of the above copyright notice. This software may not
|
|
34 |
be provided or otherwise made available to, or used by, any
|
|
35 |
other person. No title to or ownership of the software is
|
|
36 |
hereby transferred.
|
|
37 |
"
|
|
38 |
!
|
|
39 |
|
|
40 |
documentation
|
|
41 |
"
|
|
42 |
encodes/decodes UTF16 LittleEndian (little-end-first)
|
|
43 |
"
|
9326
|
44 |
!
|
|
45 |
|
|
46 |
examples
|
|
47 |
"
|
|
48 |
Encoding (unicode to utf16LE)
|
|
49 |
ISO10646_to_UTF16LE encodeString:'hello'.
|
|
50 |
|
|
51 |
|
|
52 |
Decoding (utf16LE to unicode):
|
|
53 |
|t|
|
|
54 |
|
|
55 |
t := ISO10646_to_UTF16LE encodeString:''.
|
|
56 |
ISO10646_to_UTF16LE decodeString:t.
|
|
57 |
|
|
58 |
Decoding (utf16LE-Bytes to unicode):
|
|
59 |
|bytes|
|
|
60 |
|
|
61 |
bytes := #[ 16r40 0 16r41 0 16r42 0 16r43 0 16r44 0 ].
|
|
62 |
ISO10646_to_UTF16LE decodeString:bytes.
|
|
63 |
"
|
8903
|
64 |
! !
|
|
65 |
|
|
66 |
!ISO10646_to_UTF16LE methodsFor:'private'!
|
|
67 |
|
|
68 |
nextPutTwoByteValue:anInteger to:aStream
|
|
69 |
aStream nextPutShort:anInteger MSB:false
|
|
70 |
!
|
|
71 |
|
|
72 |
nextTwoByteValueFrom:aStream
|
|
73 |
^ aStream nextUnsignedShortMSB:false
|
|
74 |
! !
|
|
75 |
|
|
76 |
!ISO10646_to_UTF16LE methodsFor:'queries'!
|
|
77 |
|
|
78 |
nameOfEncoding
|
|
79 |
^ #'utf8le'
|
|
80 |
! !
|
|
81 |
|
|
82 |
!ISO10646_to_UTF16LE class methodsFor:'documentation'!
|
|
83 |
|
|
84 |
version
|
9326
|
85 |
^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF16LE.st,v 1.2 2006-04-25 14:16:44 cg Exp $'
|
8903
|
86 |
! !
|