Klaus D. Witzel | 19 Jul 14:54

Q: FileStream class>>#writeSourceCodeFrom:* and *TextConverter

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?

TIA.

/Klaus

Yoshiki Ohshima | 23 Jul 17:46

Re: Q: FileStream class>>#writeSourceCodeFrom:* and *TextConverter

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?  Is should be isAsciiString, yes, and The Etoys
image is in that way.

-- Yoshiki

Klaus D. Witzel | 23 Jul 18:42

Re: Q: FileStream class>>#writeSourceCodeFrom:* and *TextConverter

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  
(Continue reading)

Klaus D. Witzel | 25 Jul 20:03

Re: Q: FileStream class>>#writeSourceCodeFrom:* and *TextConverter

On Wed, 23 Jul 2008 18:42:15 +0200, Klaus D. Witzel wrote:

> 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?
(Continue reading)

Edgar J. De Cleene | 26 Jul 01:04

Re: Re: Q: FileStream class>>#writeSourceCodeFrom:* and *TextConverter


El 7/25/08 3:03 PM, "Klaus D. Witzel" <klaus.witzel <at> cobss.com> escribió:

> Found that my .changes file also has some UTF8TextConverter problem (see
> log below) which lets me not find the class comment change :(
> 
> Will have to start with a fresh stock .image and, if something happens
> again, try to report it reproducable.
> 
> /Klaus
> 
> ------------------
> Error: Invalid utf8 input detected
> 25 July 2008 12:05:23 am
> 
> VM: Win32 - a SmalltalkImage
> Image: Squeak3.10.2 [latest update: #7179]

Klaus:

One of my last contributions to 3.10 was send warnings to Ken about
sometimes this odd thing happen.

But I find hard to reproduce.

Edgar

Klaus D. Witzel | 29 Jul 15:52

Re: Q: FileStream class>>#writeSourceCodeFrom:* and *TextConverter

On Sat, 26 Jul 2008 01:04:07 +0200, Edgar J. De Cleene wrote:

> El 7/25/08 3:03 PM, "Klaus D. Witzel" escribió:
>
>> Found that my .changes file also has some UTF8TextConverter problem (see
>> log below) which lets me not find the class comment change :(
>>
>> Will have to start with a fresh stock .image and, if something happens
>> again, try to report it reproducable.
>>
>> /Klaus
>>
>> ------------------
>> Error: Invalid utf8 input detected
>> 25 July 2008 12:05:23 am
>>
>> VM: Win32 - a SmalltalkImage
>> Image: Squeak3.10.2 [latest update: #7179]
>
>
> Klaus:
>
> One of my last contributions to 3.10 was send warnings to Ken about
> sometimes this odd thing happen.
>
> But I find hard to reproduce.

Thank you Edgar -- not so good thing but good to know.

/Klaus
(Continue reading)


Gmane