#FEATURE by Stefan Reise
class: CharacterEncoderImplementations::ISO10646_to_UTF16BE
removed: #isUtf16EncoderEncoder
class: ISO10646_to_UTF16BE
added:
#isUtf16Encoder
#isUtf16EncoderEncoder
#isUtfEncoder
--- a/CharacterEncoderImplementations__ISO10646_to_UTF16BE.st Wed Feb 19 16:17:35 2020 +0100
+++ b/CharacterEncoderImplementations__ISO10646_to_UTF16BE.st Wed Feb 19 16:17:53 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2005 by eXept Software AG
All Rights Reserved
@@ -59,7 +61,7 @@
Decoding (utf16BE to unicode):
|t|
- t := ISO10646_to_UTF16BE encodeString:'ÄÖÜß'.
+ t := ISO10646_to_UTF16BE encodeString:'ÄÖÜß'.
ISO10646_to_UTF16BE decodeString:t.
Decoding (utf16LE-Bytes to unicode):
@@ -299,6 +301,25 @@
"Modified: / 17-01-2018 / 14:41:31 / stefan"
! !
+!ISO10646_to_UTF16BE methodsFor:'testing'!
+
+isUtf16Encoder
+ "answer true, if this encodes from/to UTF-16 (regardless of byte-order)"
+
+ ^ true
+
+ "Created: / 19-02-2020 / 16:15:36 / Stefan Reise"
+!
+
+isUtfEncoder
+ "answer true, if this encodes from/to any UTF (regardless of how many bytes and byte-order).
+ In other words: does it make sense to prepend a BOM"
+
+ ^ true
+
+ "Created: / 19-02-2020 / 16:15:47 / Stefan Reise"
+! !
+
!ISO10646_to_UTF16BE class methodsFor:'documentation'!
version