[Pharo-project] Write accentuate characters in file

Toon Verwaest toon.verwaest at gmail.com
Mon May 16 19:06:38 CEST 2011


You could also be friendly and tell the editor that it's UTF8 using a bom
http://en.wikipedia.org/wiki/Byte_order_mark

I dunno how standard that is nowadays though.

On 05/16/2011 05:10 PM, Damien Cassou wrote:
> On Mon, May 16, 2011 at 5:01 PM, Henrik Sperre Johansen
> <henrik.s.johansen at veloxit.no>  wrote:
>> FileStream newFileNamed: 'test.txt' do: [ :stream |
>>      stream converter: MacRomanTextConverter new; " or: TextConverter
>> newForEncoding: 'mac-roman' "
>>      nextPutAll: 'ééé' ].
> This is the correct way of solving your problem... however, your
> application becomes dependent of MacOS X. If you want your application
> to be portable to other OSes, I would advise you to use the simple
> approach that you give
>
> FileStream newFileNamed: 'test.txt' do: [ :each | each nextPutAll: 'ééé' ]
>
> and tell your favorite Apple editor that this is indeed UTF-8. UTF-8
> is the standard, MacRoman is Apple only.
>




More information about the Pharo-project mailing list