Unicode handling:
authorStefan Vogel <sv@exept.de>
Thu, 06 Nov 2008 11:59:22 +0100
changeset 11319 18aa6ff91d1e
parent 11318 fc07976462e8
child 11320 0cf84c372ccf
Unicode handling: implement #printOn: via dispatching to #nextPutAllUnicode: resp. #nextPutAllText:
CharacterWriteStream.st
--- a/CharacterWriteStream.st	Thu Nov 06 11:12:33 2008 +0100
+++ b/CharacterWriteStream.st	Thu Nov 06 11:59:22 2008 +0100
@@ -116,7 +116,6 @@
      Redefined to avoid count grows of the underlying collection -
      instead a single grow on the final size is performed."
 
-
     aCharacter bitsPerCharacter > currentCharacterSize ifTrue:[
         self characterSizeChanged:aCharacter.
     ].
@@ -214,10 +213,8 @@
 !
 
 nextPutAll:aCollection
-    "append anObject count times to the receiver.
-     Redefined to avoid count grows of the underlying collection -
-     instead a single grow on the final size is performed."
-
+    "append aCollection to the receiver.
+     Redefined to convert to a string of the needed charcter size."
 
     aCollection bitsPerCharacter > currentCharacterSize ifTrue:[
         self characterSizeChanged:aCollection.
@@ -226,19 +223,22 @@
 !
 
 nextPutAll:aCollection startingAt:start to:stop
-    "append anObject count times to the receiver.
-     Redefined to avoid count grows of the underlying collection -
-     instead a single grow on the final size is performed."
-
-
     aCollection bitsPerCharacter > currentCharacterSize ifTrue:[
         self characterSizeChanged:aCollection.
     ].
     ^ super nextPutAll:aCollection startingAt:start to:stop
+!
+
+nextPutAllUnicode:aCollection
+    ^ self nextPutAll:aCollection
+!
+
+nextPutUnicode:aCharacter
+    ^ self nextPut:aCharacter
 ! !
 
 !CharacterWriteStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterWriteStream.st,v 1.7 2008-01-22 22:31:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterWriteStream.st,v 1.8 2008-11-06 10:59:22 stefan Exp $'
 ! !