[racket] current-output encoding

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 26 12:00:09 EDT 2013

At Tue, 26 Mar 2013 15:34:36 +0100, Pierpaolo Bernardi wrote:
> 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?

I think you want `reencode-output-port', probably using "" (which
represents the user's default encoding) as the target encoding.



Posted on the users mailing list.