#1286: GHC infelicity list has not been updated since the switch to UTF-8
sources
----------------------------------------+-----------------------------------
Reporter: Regidor | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Documentation | Version: 6.6
Severity: major | Resolution:
Keywords: ISO-8859-1 unicode Latin-1 | Difficulty: Easy (1 hr)
Testcase: | Architecture: x86
Os: Linux |
----------------------------------------+-----------------------------------
Changes (by sorear):
* difficulty: Unknown => Easy (1 hr)
* component: Compiler => Documentation
* summary: GHC doesn't accept ISO-8859-1 => GHC infelicity list has not
been updated since the switch to UTF-8 sources
Old description:
> According to
>
> http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs-and-
> infelicities.html#vs-Haskell-defn
>
> GHC only accepts ISO-8859-1, but, when I try to compile this source file
> in ISO-8859-1:
>
> {{{
> module Main where
> main :: IO ()
> main = do putStrLn "año"
> }}}
>
> I obtain:
>
> {{{
> main.hs:3:21:
> lexical error in string/character literal (UTF-8 decoding error)
> }}}
>
> And, if I save the source as UTF-8 it does compile, but, when running the
> program, it prints "a".
>
> Regards,
>
> Antonio Regidor García
New description:
According to
http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs-and-
infelicities.html#vs-Haskell-defn
GHC only accepts ISO-8859-1, but, when I try to compile this source file
in ISO-8859-1:
{{{
module Main where
main :: IO ()
main = do putStrLn "ano"
}}}
I obtain:
{{{
main.hs:3:21:
lexical error in string/character literal (UTF-8 decoding error)
}}}
And, if I save the source as UTF-8 it does compile, but, when running the
program, it prints "a".
Regards,
Antonio Regidor Garcia
Comment:
This is a documentation bug. GHC currently accepts UTF-8 exclusively for
source text, and the run time system uses ISO-8859-1 exclusively for IO
(truncating the high bits of any characters).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1286>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs