[GHC] #12570: Different behaviour in Linux and Mac OS when using some locale environments

GHC ghc-devs at haskell.org
Sun Sep 4 18:44:18 UTC 2016


#12570: Different behaviour in Linux and Mac OS when using some locale environments
-------------------------------------+-------------------------------------
        Reporter:  asr               |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by asr:

@@ -6,1 +6,1 @@
- $ LC_CTYPE=C ghc -e 'putStr =<< readFile "test"'
+ $ LC_ALL=C ghc -e 'putStr =<< readFile "test"'

New description:

 While reporting [https://github.com/malcolmwallace/cpphs/issues/6 this]
 cpphs issue, we found the following behaviour:

 {{{
 $ echo -e '\u2200' > test
 $ LC_ALL=C ghc -e 'putStr =<< readFile "test"'
 }}}

 In Ubuntu, we got the error

 {{{
 <interactive>: test: hGetContents: invalid argument (invalid byte
 sequence)
 }}}

 but in Mac OS the output was

 {{{
 ∀
 }}}

 GHC version: 8.0.1

--

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


More information about the ghc-tickets mailing list