[plt-scheme] encoding: latin1 and utf

From: Daniel Pinto de Mello e Silva (daniel.silva at gmail.com)
Date: Sat Apr 30 02:38:01 EDT 2005

Does (locale-string-encoding) return "ISO-8859-1" ?

Setting my locale to pt_BR (ANSI_X3.4-1968) while my terminal/input is
in Latin-1 gives me a similar problem:

> (locale-string-encoding)
"ANSI_X3.4-1968"
> (string->bytes/locale "programação")
string->bytes/locale: string cannot be encoded for the current locale:
"programação"
> (string->bytes/latin-1 "programação")
#"programa\347\343o"

So maybe you have a mismatch too.

Daniel

On 4/28/05, Pedro Kröger <kroegerlistas at pedrokroeger.net> wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> Hi,
> 
> how can I use latin1 strings with plt scheme 299.100? If I put something
> like:
> 
>  (display "não\n")
> 
> I get:
> 
> bytes->string/utf-8: string is not a well-formed UTF-8 encoding: #"(display \"n\343o\\n\")"
> 
> [I have no intention of using utf-8]
> 
> Thanks in advanced,
> 
> Pedro Kröger
> 
>



Posted on the users mailing list.