[racket] current-output encoding
Does this do what you want?
> (display (string->bytes/latin-1 "à"))
à
See also: http://docs.racket-lang.org/reference/encodings.html?q=locale
I know that UTF-8 and Latin-1 are supported, at least. Other encodings
might be in extra libraries, eg.
http://docs.racket-lang.org/r6rs-lib-std/r6rs-lib-Z-H-9.html?q=utf-16&q=latin-1&q=locale#node_idx_594
Pierpaolo Bernardi <olopierpa at gmail.com> writes:
> Hello,
>
> suppose I have this program:
>
> ====
> #lang racket
>
> (display "à")
> ====
>
> This works as intended when run from DrRacket, but it displays
> mojibake if I generate an executable and run it from a console (on
> windows).
>
> How do I tell Racket what encoding to use for current-output?
>
> Cheers
> P.
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users