Opened 3 years ago

Last modified 4 weeks ago

#10542 new bug

Incorrect Unicode input on Windows Console

Reported by: ptroev Owned by:
Priority: normal Milestone: 8.6.1
Component: Compiler Version: 7.8.3
Keywords: windows stdin utf-8 cmd chcp 65001 getLine Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: Incorrect result at runtime Test Case:
Blocked By: Blocking:
Related Tickets: #11394, #4471 Differential Rev(s):
Wiki Page:


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

Change History (4)

comment:1 Changed 2 years ago by bgamari

comment:2 Changed 13 months ago by Phyx-

Milestone: 8.4.1
Priority: highnormal

I don't think anything is going to happen here until the new I/O manager is ready. So demoting priority.

comment:3 Changed 3 months ago by bgamari


This ticket won't be resolved in 8.4; remilestoning for 8.6. Do holler if you are affected by this or would otherwise like to work on it.

comment:4 Changed 4 weeks ago by bgamari

Phyx says the new I/O manager may well be ready for 8.6.

Note: See TracTickets for help on using tickets.