[Pharo-project] Write accentuate characters in file

Alexandre Bergel alexandre.bergel at me.com
Mon May 16 18:03:02 CEST 2011


Amazing that it is easier to go to England from France than manipulating accented characters in today's programming languages.
I am surprised when I see a website in Chile that does not replace "ñ" by "??"

Thanks for your help guys. I have learnt something today.

Alexandre


On 16 May 2011, at 11:01, Henrik Sperre Johansen wrote:

> On 16.05.2011 16:42, Adrien BARREAU wrote:
>> Hello,
>> 
>> A small question I have: how can I write a "é" character in a file and >really< get it in Mac OS?
>> I tried with: 
>> 
>>   FileStream newFileNamed: 'test.txt' do: [ :each | each nextPutAll: 'ééé' ]
>> 
>> and got: 'ééé'.
>> 
>> I also tried with FileSystem and got : 'ÈÈÈ'.
>> 
>> I do not see another way to do that ...
>> 
>> 
>> Regards,
>> Adrien.
> FileStream newFileNamed: 'test.txt' do: [ :stream | 
>     stream converter: MacRomanTextConverter new; " or: TextConverter newForEncoding: 'mac-roman' "
>     nextPutAll: 'ééé' ].
> 
> Cheers,
> Henry

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.








More information about the Pharo-project mailing list