equal
deleted
inserted
replaced
|
1 "{ Encoding: utf8 }" |
|
2 |
1 " |
3 " |
2 COPYRIGHT (c) 2005 by eXept Software AG |
4 COPYRIGHT (c) 2005 by eXept Software AG |
3 All Rights Reserved |
5 All Rights Reserved |
4 |
6 |
5 This software is furnished under a license and may be used |
7 This software is furnished under a license and may be used |
57 |
59 |
58 |
60 |
59 Decoding (utf16BE to unicode): |
61 Decoding (utf16BE to unicode): |
60 |t| |
62 |t| |
61 |
63 |
62 t := ISO10646_to_UTF16BE encodeString:'ÄÖÜß'. |
64 t := ISO10646_to_UTF16BE encodeString:'ÄÖÜß'. |
63 ISO10646_to_UTF16BE decodeString:t. |
65 ISO10646_to_UTF16BE decodeString:t. |
64 |
66 |
65 Decoding (utf16LE-Bytes to unicode): |
67 Decoding (utf16LE-Bytes to unicode): |
66 ISO10646_to_UTF16LE decodeString:#[ 16r40 0 16r41 0 16r42 0 16r43 0 16r44 0 ]. |
68 ISO10646_to_UTF16LE decodeString:#[ 16r40 0 16r41 0 16r42 0 16r43 0 16r44 0 ]. |
67 ISO10646_to_UTF16BE decodeString:#[ 16r40 0 16r41 0 16r42 0 16r43 0 16r44 0 ] copy swapBytes. |
69 ISO10646_to_UTF16BE decodeString:#[ 16r40 0 16r41 0 16r42 0 16r43 0 16r44 0 ] copy swapBytes. |
297 |
299 |
298 "Created: / 16-01-2018 / 22:31:29 / stefan" |
300 "Created: / 16-01-2018 / 22:31:29 / stefan" |
299 "Modified: / 17-01-2018 / 14:41:31 / stefan" |
301 "Modified: / 17-01-2018 / 14:41:31 / stefan" |
300 ! ! |
302 ! ! |
301 |
303 |
|
304 !ISO10646_to_UTF16BE methodsFor:'testing'! |
|
305 |
|
306 isUtf16Encoder |
|
307 "answer true, if this encodes from/to UTF-16 (regardless of byte-order)" |
|
308 |
|
309 ^ true |
|
310 |
|
311 "Created: / 19-02-2020 / 16:15:36 / Stefan Reise" |
|
312 ! |
|
313 |
|
314 isUtfEncoder |
|
315 "answer true, if this encodes from/to any UTF (regardless of how many bytes and byte-order). |
|
316 In other words: does it make sense to prepend a BOM" |
|
317 |
|
318 ^ true |
|
319 |
|
320 "Created: / 19-02-2020 / 16:15:47 / Stefan Reise" |
|
321 ! ! |
|
322 |
302 !ISO10646_to_UTF16BE class methodsFor:'documentation'! |
323 !ISO10646_to_UTF16BE class methodsFor:'documentation'! |
303 |
324 |
304 version |
325 version |
305 ^ '$Header$' |
326 ^ '$Header$' |
306 ! |
327 ! |