[racket] east asian characters were broken when I run from an Executable file

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Oct 3 07:32:55 EDT 2010

At Sun, 3 Oct 2010 11:38:22 +0900, 김태윤 wrote:
> I'm using DrRacket for Scheme Programming.
> for I'm not a person who use native English, I need to print out east asian
> language.
> there is no problem when I press run button in IDE.
> east asian language is printed well.
> but when I make an Executable file, and execute, east asian characters were
> broken when program prints out.
> is there any way to solve this problem?

Racket assumes that stdin and stdout use UTF-8 for encoding characters.
You can effetcively change that assumption by wrapping the current
input and output ports with converters.


  (reencode-output-port (current-output-port) "" #f))

to the beginning of your program may fix the problem.

Posted on the users mailing list.