CharacterEncoder.st
changeset 18624 1f113cce940e
parent 18305 6f48f7030f47
child 18630 a74d669db937
child 18762 4b2d5801f66c
--- a/CharacterEncoder.st	Thu Jul 23 13:14:12 2015 +0200
+++ b/CharacterEncoder.st	Thu Jul 23 13:45:44 2015 +0200
@@ -1327,12 +1327,14 @@
 encodeString:aUnicodeString
     "given a string in unicode, return a string in my encoding for it"
 
-    |newString myCode uniCodePoint bits|
+    |newString myCode uniCodePoint bits 
+     stringSize "{ Class: SmallInteger }"|
 
-    newString := String new:(aUnicodeString size).
+    stringSize := aUnicodeString size.
+    newString := String new:stringSize.
     bits := newString bitsPerCharacter.
 
-    1 to:aUnicodeString size do:[:idx |
+    1 to:stringSize do:[:idx |
         uniCodePoint := (aUnicodeString at:idx) codePoint.
         myCode := self encode:uniCodePoint.
         myCode > 16rFF ifTrue:[
@@ -1739,11 +1741,11 @@
 !CharacterEncoder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoder.st,v 1.139 2015-04-29 11:21:18 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoder.st,v 1.139 2015-04-29 11:21:18 cg Exp $'
+    ^ '$Header$'
 ! !