[Pharo-project] Write accentuate characters in file
Sven Van Caekenberghe
sven at beta9.be
Mon May 16 17:09:44 CEST 2011
On 16 May 2011, at 16:42, Adrien BARREAU wrote:
> 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 ...
Works for me (Pharo 1.2.x , Mac OS X 10.6.x)
FileStream newFileNamed: '/tmp/foo.txt' do: [ :each | each nextPutAll: 'ééé' ].
(FileStream fileNamed: '/tmp/foo.txt') upToEnd 'ééé'
More information about the Pharo-project