Bug in MultiByteFileStream

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

Bug in MultiByteFileStream

Mateusz Grotek
Identifier 0007602

#nextPut: does the conversion, but #nextPutAll: doesn't.
Maybe should TextConverter do the conversion?
Either we change TextConverter to do the conversion, or we change
MultiByteFileStream to do it before or after using TextConverter.
First solution is obviously faster, but I don't know the code well
enough to tell if it's the best alternative.


Reply | Threaded
Open this post in threaded view
|

Re: Bug in MultiByteFileStream

Mateusz Grotek
Mateusz Grotek pisze:

> Identifier 0007602
>
> #nextPut: does the conversion, but #nextPutAll: doesn't.
> Maybe should TextConverter do the conversion?
> Either we change TextConverter to do the conversion, or we change
> MultiByteFileStream to do it before or after using TextConverter.
> First solution is obviously faster, but I don't know the code well
> enough to tell if it's the best alternative.
>
>
>
Also found second one:

Identifier 0007603

This time the solution is trivial and it's an implementation of
#next:putAll:startingAt: in MultiByteFileStream


Reply | Threaded
Open this post in threaded view
|

Re: Bug in MultiByteFileStream

Mateusz Grotek

> Also found second one:
>
> Identifier 0007603
>
> This time the solution is trivial and it's an implementation of
> #next:putAll:startingAt: in MultiByteFileStream
>
>

Damn, not so trivial >:-( It seems it'd be better to change XMLWriter
after all.



Reply | Threaded
Open this post in threaded view
|

Re: Bug in MultiByteFileStream

Levente Uzonyi-2
In reply to this post by Mateusz Grotek
On Sun, 30 Jan 2011, Mateusz Grotek wrote:

> Mateusz Grotek pisze:
>> Identifier 0007602
>>
>> #nextPut: does the conversion, but #nextPutAll: doesn't.
>> Maybe should TextConverter do the conversion?
>> Either we change TextConverter to do the conversion, or we change
>> MultiByteFileStream to do it before or after using TextConverter.
>> First solution is obviously faster, but I don't know the code well
>> enough to tell if it's the best alternative.
>>
>>
>>
> Also found second one:
>
> Identifier 0007603
>
> This time the solution is trivial and it's an implementation of
> #next:putAll:startingAt: in MultiByteFileStream
>
>
>

I didn't try it in Squeak 4.1, but in Squeak 4.2 XMLWriter has no
#writeXmlEncoded: method. Where did you load XMLWriter from?


Levente

Reply | Threaded
Open this post in threaded view
|

Re: Bug in MultiByteFileStream

Mateusz Grotek

> I didn't try it in Squeak 4.1, but in Squeak 4.2 XMLWriter has no
> #writeXmlEncoded: method. Where did you load XMLWriter from?
>
>
> Levente
>
>

http://www.squeaksource.com/XMLWriter

Name: XML-Writer-JAAyer.5
Author: JAAyer
Time: 20 January 2011, 2:58:19 am
UUID: 513cba2b-3241-43eb-828f-47a1321b5c1c
Ancestors: XML-Writer-JAAyer.4

Reply | Threaded
Open this post in threaded view
|

Re: Bug in MultiByteFileStream

Levente Uzonyi-2
On Sun, 30 Jan 2011, Mateusz Grotek wrote:

>
>> I didn't try it in Squeak 4.1, but in Squeak 4.2 XMLWriter has no
>> #writeXmlEncoded: method. Where did you load XMLWriter from?
>>
>>
>> Levente
>>
>>
>
> http://www.squeaksource.com/XMLWriter
>
> Name: XML-Writer-JAAyer.5
> Author: JAAyer
> Time: 20 January 2011, 2:58:19 am
> UUID: 513cba2b-3241-43eb-828f-47a1321b5c1c
> Ancestors: XML-Writer-JAAyer.4
>
>

Interesting. A class named XMLWriter already exists in the XML-Parser
package which is part of Squeak. Also the class XMLString (used in your
example) doesn't exist in any of these packages.

Anyway, the bug is in Squeak.


Levente