Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.84.mcz==================== Summary ====================
Name: Multilingual-nice.84
Author: nice
Time: 18 January 2010, 3:12:54.574 pm
UUID: 7b4cc091-4ed9-de4c-82fa-07f67f77f7d2
Ancestors: Multilingual-nice.83
Use literal ByteArray
=============== Diff against Multilingual-nice.83 ===============
Item was changed:
----- Method: MultiByteBinaryOrTextStream>>guessConverter (in category 'private') -----
guessConverter
+ ^ (self originalContents includesSubString: #[27 36] asString)
- ^ (self originalContents includesSubString: (ByteArray withAll: {27. 36}) asString)
ifTrue: [CompoundTextConverter new]
ifFalse: [self class defaultConverter ]!
Item was changed:
----- Method: MultiByteBinaryOrTextStream>>setConverterForCode (in category 'fileIn/Out') -----
setConverterForCode
| current |
current := converter saveStateOf: self.
self position: 0.
self binary.
+ ((self next: 3) = #[ 16rEF 16rBB 16rBF ]) ifTrue: [
- ((self next: 3) = (ByteArray with: 16rEF with: 16rBB with: 16rBF)) ifTrue: [
self converter: UTF8TextConverter new
] ifFalse: [
self converter: MacRomanTextConverter new.
].
converter restoreStateOf: self with: current.
self text.
!
Item was changed:
----- Method: MultiByteFileStream>>setConverterForCode (in category 'private') -----
setConverterForCode
| current |
(SourceFiles at: 2)
ifNotNil: [self fullName = (SourceFiles at: 2) fullName ifTrue: [^ self]].
current := self converter saveStateOf: self.
self position: 0.
self binary.
+ ((self next: 3) = #[ 16rEF 16rBB 16rBF ]) ifTrue: [
- ((self next: 3) = (ByteArray with: 16rEF with: 16rBB with: 16rBF)) ifTrue: [
self converter: UTF8TextConverter new
] ifFalse: [
self converter: MacRomanTextConverter new.
].
converter restoreStateOf: self with: current.
self text.
!