[squeak-dev] problem with accent characters in fileIn (squeak 5.3)
BERTRAND AJ
aj.bertrand at free.fr
Sun Nov 6 12:08:00 UTC 2022
l’m new on this list, so sorry if i am not in the correct use.
I have problems with accent characters in fileOut and subsequent fileIn
(éèà) because i'm French
It seems that Squeak saves fileOut files always in UTF8 now, but uses a
converter not UTF8 for the fileIn.
With the following modification it works for me, but i did not try all
cases so...
The modif is :
MultiByteFileStream >> setConverterForCode
setConverterForCode
| currentPosition |
(SourceFiles at: 2)
ifNotNil: [self fullName = (SourceFiles at: 2) fullName ifTrue:
[^ self]].
"currentPosition := self position.
self position: 0.
self binary.
((self next: 3) = #[ 16rEF 16rBB 16rBF ]) ifTrue: ["
self converter: UTF8TextConverter new
"] ifFalse: [
self converter: MacRomanTextConverter new.
].
self position: currentPosition."
self text.
with this modification, Squeak will always use UTF8TextConverter
--
André Jacques BERTRAND,
More information about the Squeak-dev
mailing list
|