--- a/PeekableStream.st Thu Nov 21 22:24:12 2019 +0100
+++ b/PeekableStream.st Thu Nov 21 22:24:46 2019 +0100
@@ -1284,6 +1284,32 @@
"Modified: 15.5.1996 / 17:51:42 / cg"
! !
+!PeekableStream methodsFor:'testing'!
+
+isUnicodeEncoded
+ "return true, if the streamed collection is any string (8-, 16- or 32-bit),
+ which definitly is not using UTF-x or JIS or any other encoding.
+ I.e. 'self next' always returns a unicode character.
+ Note: the answer of false sows not mean that it is not unicode,
+ but it does mean that we don't know for sure."
+
+ ^ (self objectAttributeAt:#isUnicodeEncoded) == true.
+
+ "Created: / 21-11-2019 / 18:46:01 / Stefan Vogel"
+!
+
+isUnicodeEncoded:aBoolean
+ "set to true, if the streamed collection is any string (8-, 16- or 32-bit),
+ which definitly is not using UTF-x or JIS or any other encoding.
+ I.e. 'self next' always returns a unicode character.
+ Note: the answer of false sows not mean that it is not unicode,
+ but it does mean that we don't know for sure."
+
+ self objectAttributeAt:#isUnicodeEncoded put:aBoolean.
+
+ "Created: / 21-11-2019 / 18:47:36 / Stefan Vogel"
+! !
+
!PeekableStream class methodsFor:'documentation'!
version