[racket] How does DrRacket determine encoding?

From: Dmitry Pavlov (dpavlov at ipa.nw.ru)
Date: Fri Jul 25 11:12:13 EDT 2014

Hello,

I have a Racket on Windows XP machine and
a Racket on a Windows Server machine.

I type some cyrillic text into DrRacket on XP, save the file,
and the resulting file has the CP1251 encoding.

I type some cyrillic text into DrRacket on Windows Server,
save the file, and the resulting file has the UTF-8 encoding.

notepad.exe tends to save to CP1251 on both machines.
HKEY_LOCAL_MACHINE\SYSTEM\\\CurrentControlSet\\Control\\Nls\\CodePage\\ACP
is "1251" on both machines.

How do I programmatically predict which encoding DrRacket
will choose?


Regards,

Dmitry

Posted on the users mailing list.