
#10542: Incorrect Unicode input on Windows Console -------------------------------------+------------------------------------- Reporter: ptroev | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.8.3 Keywords: windows | Operating System: Windows stdin utf-8 cmd chcp 65001 | Type of failure: Incorrect result getLine | at runtime Architecture: | Blocked By: Unknown/Multiple | Related Tickets: 4471 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- 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 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10542 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler