Stream.st
changeset 24035 ed67960ad29d
parent 24031 46f45f402974
child 24148 0a40f4bca78d
--- a/Stream.st	Tue Apr 02 10:50:28 2019 +0200
+++ b/Stream.st	Tue Apr 02 11:10:46 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -220,6 +222,7 @@
     ^ self == Stream
 ! !
 
+
 !Stream methodsFor:'Compatibility-Dolphin'!
 
 display:someObject
@@ -229,6 +232,7 @@
     self nextPutAll: someObject asString.
 ! !
 
+
 !Stream methodsFor:'Compatibility-VW'!
 
 commit
@@ -1987,7 +1991,7 @@
 
     "
         (#[] writeStream
-            nextPutAllUtf16Bytes:'BÄxxx' MSB:true;
+            nextPutAllUtf16Bytes:'BÄxxx' MSB:true;
             nextPutUtf16:(Character codePoint:16r10CCCC) MSB:true;
             contents)
    "
@@ -2013,28 +2017,29 @@
     ].
 
     "
-        String streamContents:[:s|
-            s nextPutAllUtf8:'hallo'
-        ].
-
-        ByteArray streamContents:[:s|
-            s nextPutAllUtf8:'hallo'
-        ].
-
-        String streamContents:[:s|
-            s nextPutAllUtf8:'abcdeäöüß' asUnicode32String
-        ].
-.
-        ByteArray streamContents:[:s|
-            s nextPutAllUtf8:'abcdeäöüß' asUnicode32String
-        ].
-
-        '/tmp/bytes' asFilename writingFileDo:[:s|
-            s nextPutAllUtf8:'abcdeäöüß'
-        ].
+     String streamContents:[:s|
+         s nextPutAllUtf8:'hallo'
+     ].
+
+     ByteArray streamContents:[:s|
+         s nextPutAllUtf8:'hallo'
+     ].
+
+     String streamContents:[:s|
+         s nextPutAllUtf8:'abcdeäöüß' asUnicode32String
+     ].
+
+     ByteArray streamContents:[:s|
+         s nextPutAllUtf8:'abcdeäöüß' asUnicode32String
+     ].
+
+     '/tmp/bytes' asFilename writingFileDo:[:s|
+         s nextPutAllUtf8:'abcdeäöüß'
+     ].
     "
 
     "Modified (format): / 16-02-2017 / 20:28:52 / stefan"
+    "Modified (comment): / 02-04-2019 / 11:10:25 / Claus Gittinger"
 !
 
 nextPutByte:aByteValue
@@ -2461,7 +2466,7 @@
     "
         ((WriteStream on:Unicode16String new)
             nextPutUtf16:$B;
-            nextPutUtf16:$Ä; 
+            nextPutUtf16:$Ä; 
             nextPutUtf16:(Character codePoint:16r10CCCC)
             yourself) contents
     "
@@ -2496,19 +2501,19 @@
     "
         (#[] writeStream
             nextPutUtf16Bytes:$B MSB:true;
-            nextPutUtf16Bytes:$Ä MSB:true;
+            nextPutUtf16Bytes:$Ä MSB:true;
             nextPutUtf16Bytes:(Character codePoint:16r10CCCC) MSB:true;
             contents)
 
         ('' writeStream
             nextPutUtf16Bytes:$B MSB:true;
-            nextPutUtf16Bytes:$Ä MSB:true;
+            nextPutUtf16Bytes:$Ä MSB:true;
             nextPutUtf16Bytes:(Character codePoint:16r10CCCC) MSB:true;
             contents)
 
         (FileStream newTemporary
             nextPutUtf16Bytes:$B MSB:false;
-            nextPutUtf16Bytes:$Ä MSB:false;
+            nextPutUtf16Bytes:$Ä MSB:false;
             nextPutUtf16Bytes:(Character codePoint:16r10CCCC) MSB:false;
             reset;
             binary;
@@ -2620,7 +2625,7 @@
     "
       (String streamContents:[:s|
             s nextPutUtf8:$a.
-            s nextPutUtf8:$ü.
+            s nextPutUtf8:$ü.
             s nextPutUtf8: (Character value:16r1fff).
             s nextPutUtf8: (Character value:16rffff).
             s nextPutUtf8: (Character value:16r1ffffff).