
#10477: Tab-completing in a directory with Unicode heiroglyph crashes ghci -------------------------------+------------------------------------------- Reporter: acfoltzer | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.10.1 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------+------------------------------------------- Comment (by AlexET): This specific problem comes from haskeline. It uses `map (toEnum . fromEnum)` to convert a `String` to a list of `Word16` before printing the string. This fails in this case of wider characters which need to be encoded with a surrogate pair. There is a six year old ticket here http://trac.haskell.org/haskeline/ticket/63. The bad news is that printing using the functions in the prelude has even worse unicode support on windows. It seems to print garbage (this includes for the unicode quotes in compiler error messages). If we are in the standard code page we just get errors (as expected). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10477#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler