[squeak-dev] Re: Q: FileStream class>>#writeSourceCodeFrom:*
and *TextConverter
Klaus D. Witzel
klaus.witzel at cobss.com
Wed Jul 23 16:42:15 UTC 2008
On Wed, 23 Jul 2008 17:46:58 +0200, Yoshiki Ohshima wrote:
> At Sat, 19 Jul 2008 14:55:45 +0200,
> Klaus D. Witzel wrote:
>>
>> Hi,
>>
>> I'm trying to successfully fileOut and fileIn class and method comments
>> with characters codePoint <= 255 (the "european" range of byte size
>> characters).
>>
>> Fileout works but the file looks to have prefix from #writeBOMOn: of
>> UTF8TextConverter and file suffix is ".st" or ".cs". On fileIn this
>> fails
>> with syntax error :( and Google search did not help. Has anyone
>> experience
>> with source code fileOut/fileIn for the "european" character range?
>>
>> Did a quick shot on FileStream class>>#writeSourceCodeFrom:*, with
>> #isAsciiString replaced by #isWideString (followed by ifFalse:ifTrue:),
>> filed out again and then fileIn was happy again.
>>
>> I understand this is perhaps not really sort of bug, but want a bit more
>> than just the ascii characters. So what do you Squeakers recommend, how
>> should that be done in a Squeak platform compatible way?
>
> What version is it?
Found the method in 3.10 and checked it against 3.9 (same method), but in
3.8 the method source code is garbled (decompiler shows it's the same
method).
Meanwhile I did:
filedIn unpatched 3.9 from fileOut of my patched 3.10 (has no BOM): worked
filedOut again from 3.9: (it wrote BOM as expected)
filedIn 3.9 the fileOut from 3.9 (it has BOM): it worked
filedIn 3.10 the fileOut from 3.9 (it has BOM): it worked
Now I'm stuck, since the problem was not reproduced ? (did a lot of
changes meanwhile to the class comment in question). Will have to go
through the .changes and try to find the problematic chunk. FWIW the net
effect was the compiler raised a SyntaxError complaining about the BOM
characters.
I'll let you know what I find.
> Is should be isAsciiString,
Anything which at fileOut time is compatible with fileIn's decision should
work (IMHO), for example #isOctetString looks to be great for many
"european" users.
> yes, and The Etoys image is in that way.
Okay. And thank you.
/Klaus
> -- Yoshiki
>
>
More information about the Squeak-dev
mailing list
|