Incorrect Unicode input on Windows Console
To reproduce:
-
start a windows console
-
change the console's font to a ttf unicode font, like "Lucida Console".
-
type "chcp 65001" to set it to the UTF-8 code page.
-
start ghci (same error appears when running compiled executable)
-
> import System.IO (or GHC.IO.Handle)
-
> enc <- mkTextEncoding "UTF8"
-
> hSetEncoding stdin enc
-
> getLine
-
> Фывфыв (or any international unicode sequence)
-
** Exception: <stdin>: hGetLine: end of file
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | high |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | #4471 (closed) |
Blocking | |
CC | |
Operating system | |
Architecture |