[GHC] #8118: <stdout>: commitAndReleaseBuffer: invalid argument (invalid character)

GHC ghc-devs at haskell.org
Tue Feb 2 14:08:33 UTC 2016


#8118: <stdout>: commitAndReleaseBuffer: invalid argument (invalid character)
-------------------------------------+-------------------------------------
        Reporter:  guest             |                Owner:
            Type:  bug               |               Status:  infoneeded
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #5666             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 OK, thank you for confirming. As I
 [https://ghc.haskell.org/trac/ghc/ticket/7593#comment:6 noted] in #7593,
 just changing the encoding to `utf8` is a sufficient fix for `mintty`, but
 it's not enough for `cmd.exe`. For the latter, the only solution I've
 found was to use native Windows console API functions such as
 `WriteConsoleW` and `ReadConsoleW`. This only works for `stdin`/`stdout`,
 though, and not general file IO.

 I imagine it would be a pretty significant time investment redesigning
 Haskell IO to use Windows API calls everywhere, though.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8118#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list