[Pharo-project] String, ByteString and WideString
Working with WebClient i found what it lacks of non latin languages support (for example Russian). During investigation i found, what for streaming there used ByteString, which is custructed by calling String class>>new:. All subclases of String by calling of this method produces only ByteString instances. Also WriteStream>>contents indirectly calls String class>>new:. So even you construct WideString with #basicNew: calling (WideString basicNew: size) writeStrem contents produce only ByteString Is this a bug or there some workaround? Thanks. -- Andrey Larionov
andrey can you post the mail to squeak since andreas read it more than this mailing-list I imagine. Stef On Aug 1, 2010, at 1:56 AM, Andrey Larionov wrote:
Working with WebClient i found what it lacks of non latin languages support (for example Russian). During investigation i found, what for streaming there used ByteString, which is custructed by calling String class>>new:. All subclases of String by calling of this method produces only ByteString instances. Also WriteStream>>contents indirectly calls String class>>new:. So even you construct WideString with #basicNew: calling (WideString basicNew: size) writeStrem contents produce only ByteString
Is this a bug or there some workaround?
Thanks.
-- Andrey Larionov
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 01.08.2010 01:56, Andrey Larionov wrote:
Working with WebClient i found what it lacks of non latin languages support (for example Russian). During investigation i found, what for streaming there used ByteString, which is custructed by calling String class>>new:. All subclases of String by calling of this method produces only ByteString instances. Also WriteStream>>contents indirectly calls String class>>new:. So even you construct WideString with #basicNew: calling (WideString basicNew: size) writeStrem contents produce only ByteString
You probably want one of the MultiByteStreams and then set either the encoding or the converter. Cheers Philippe
maybe, but i'm thinking what (WideString basicNew: size) writeStrem contents should return WideString, not the ByteString On Sun, Aug 1, 2010 at 17:48, Philippe Marschall <kustos@gmx.net> wrote:
On 01.08.2010 01:56, Andrey Larionov wrote:
Working with WebClient i found what it lacks of non latin languages support (for example Russian). During investigation i found, what for streaming there used ByteString, which is custructed by calling String class>>new:. All subclases of String by calling of this method produces only ByteString instances. Also WriteStream>>contents indirectly calls String class>>new:. So even you construct WideString with #basicNew: calling (WideString basicNew: size) writeStrem contents produce only ByteString
You probably want one of the MultiByteStreams and then set either the encoding or the converter.
Cheers Philippe
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Andrey Larionov -
Philippe Marschall -
Stéphane Ducasse