[plt-scheme] Encodings in PLT Scheme

From: Jean-Pierre Lozi (jean-pierre at lozi.org)
Date: Mon Jun 25 17:26:04 EDT 2007

How do encodings in PLT-scheme work? I have a list, stored in a file.
This list contains strings, with accentuated characters. It appears
that, whether I use drscheme in UTF-8 or ISO-8859-15 (result of
(locale-source-encoding)), using the "read" function only works when
the file is encoded with UTF-8. Otherwise, I get question marks
instead of accentuated characters.

Moreover, when reading a file not encoded in UTF-8, I have to use
read-bytes-line and bytes->string/latin-1, otherwise, I get question
marks instead of accentuated characters.

I don't really understand why.

Any ideas?

-- 
Jean-Pierre Lozi
http://www.lozi.org
mailto:jean-pierre at lozi.org


Posted on the users mailing list.