Hi Nicolas, Thanks for the tips. I am a bit alien to the topic of encodings, so I will ask a couple of silly questions. How exactly do I deal with another encoding? For example, why does this work with Utf-8, and what would I do if I encountered another encoding? Or more general, how can I find out what kind of converter I need for a given file? Cheers, Doru On 30 Nov 2009, at 12:30, Nicolas Cellier wrote:
You may try this:
(CrLfFileStream readOnlyFileNamed: fullPath) converter: Latin1TextConverter new; contentsOfEntireFile
Or if you want more explicit control:
(MultiByteFileStream readOnlyFileNamed: fullPath) lineEndConvention: #crlf; converter: Latin1TextConverter new; contentsOfEntireFile.
Nicolas
2009/11/30 Tudor Girba <tudor.girba@gmail.com>:
Hi,
I know that there was a long discussion regarding opening of files, but I did not see a resolution.
I would like to be able to read files regardless of the encoding. I am using this code: (CrLfFileStream readOnlyFileNamed: fullPath) contentsOfEntireFile"
but I get an error when I reach a file in Latin 1 (ISO-8859-1).
How can I safely deal with this issue without getting hurt?
Cheers, Doru
-- www.tudorgirba.com
"When people care, great things can happen."
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- www.tudorgirba.com "When people care, great things can happen."