|
On Jul 7, 2007, at 16:00 , stephane ducasse wrote:
> hi all
>
> I'm confused.
> I have a MultiByteFileStream which has a MacRomanTextConverter
> and I get an error Cannot write wide characters
>
> Do you have any idea of the direction in which I should start to
> look for?
> Changing the converter?
If you want to write general wide strings, use a UTF-8 converter.
> Will I lose the encodings of my string?
Using a MacRoman converter you can only write those wide characters
that have a MacRoman encoding.
> nextPut: aCharacter toStream: aStream
> | ch |
> aStream isBinary ifTrue: [^aCharacter storeBinaryOn: aStream].
> (ch := aCharacter squeakToMac) asciiValue > 255
> ifTrue:[^self error: 'Cannot write wide characters'].
> aStream basicNextPut: ch.
>
>
- Bert -
|