[GHC] #10907: GHC fails to read file with byte-order mark when LANG=C

GHC ghc-devs at haskell.org
Tue Sep 22 13:48:50 UTC 2015


#10907: GHC fails to read file with byte-order mark when LANG=C
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.2
  (Parser)                           |
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
 Type of failure:  GHC doesn't work  |  (amd64)
  at all                             |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #6016, #6037      |  Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by RyanGlScott:

Old description:

> I've attached a minimal example that causes the problem. Compiling
> `ByteOrderMark.hs` like so fails:
>
> {{{
> $ LANG=C ghc ByteOrderMark.hs
> ByteOrderMark.hs: hLookAhead: invalid argument (invalid byte sequence)
> }}}
>
> I can reproduce this on x86_64 Linux using GHC 7.10.2 and HEAD.

New description:

 I've attached a minimal example that causes the problem. Compiling
 `ByteOrderMark.hs` like so fails:

 {{{
 $ LANG=C ghc ByteOrderMark.hs
 ByteOrderMark.hs: hLookAhead: invalid argument (invalid byte sequence)
 }}}

 I can reproduce this on x86_64 Linux using GHC 7.10.2 and HEAD.

 Note that compiling it without `LANG=C` does work.

--

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


More information about the ghc-tickets mailing list