How to make the following code work with Unicode (CJK) in Command Prompt/LameShell?
main = getLine >>= putStrLn
(Windows 8.1, Haskell Platform 2014)
No, chcp 65001
doesn't work, nor chcp 10000
.
No, I don't want to change System Local (Control Panel/Clock, Language, and Region/Language/Change date, time, or number formats/Administrative) from English(United States) to others.
Yes, I have set font to Lucida Console.
I've tried ConEmu/Cmder/Console2, they all said "Exception: : hGetLine: end of file". I also tried Emacs, (I use Vim), it didn't crash, but I always get spaces, no matter what I input.
Patch GHC and recompile it is acceptable, if there is no other way.
Any idea?
Thanks.