The Trunk: EToys-ul.280.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: EToys-ul.280.mcz

commits-2
Levente Uzonyi uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-ul.280.mcz

==================== Summary ====================

Name: EToys-ul.280
Author: ul
Time: 27 February 2017, 1:34:44.128483 pm
UUID: 29c41958-b162-47d6-8457-704818377065
Ancestors: EToys-ul.279

KOI8RTextConverter takes into account the installed line end convention when it's encoding characters.
This fixes the failing #testLineEndConversion.
The converter seems to be a ByteTextConverter, but since I wouldn't be able to tell if it works or not if I were to change it, I decided to leave it as it is.

=============== Diff against EToys-ul.279 ===============

Item was changed:
  ----- Method: KOI8RTextConverter>>nextPut:toStream: (in category 'as yet unclassified') -----
  nextPut: aCharacter toStream: aStream
 
+ | charCode |
+ aStream isBinary ifTrue: [ ^aCharacter storeBinaryOn: aStream ].
+ (charCode := aCharacter charCode) < 256
+ ifFalse: [ aStream basicNextPut: ((Character value: (self fromSqueak: aCharacter) charCode)) ]
+ ifTrue: [
+ (latin1Encodings at: charCode + 1)
+ ifNil: [ aStream basicNextPut: aCharacter ]
+ ifNotNil: [ :encodedString | aStream basicNextPutAll: encodedString ] ].
+ ^aCharacter
- aStream isBinary ifTrue: [^aCharacter storeBinaryOn: aStream].
- aCharacter charCode < 128 ifTrue: [
- aStream basicNextPut: aCharacter.
- ] ifFalse: [
- aStream basicNextPut: ((Character value: (self fromSqueak: aCharacter) charCode)).
- ].
  !