6.12.1rc1: non-Latin filenames in GHCi
Chryssochoidis Christos
christosc at me.com
Sun Oct 18 15:15:57 EDT 2009
Thanks Don for your reply.
I may have overlooked something in the blog post you gave, but my
understanding is that it talks about the user's input/output to and
from GHCi and the file system. The user IO with non-Latin chars seems
to work fine in GHC 6.12.1; e.g.:
>
> *Main> putStrLn "πρόχειρον.hs"
> πρόχειρον.hs
> *Main> getLine >>= putStrLn
> πρόχειρον.hs
> πρόχειρον.hs
> *Main>
It's only when GHCi attempts to print a diagnostic message containing
a filename with non-Latin chars that the garbling occurs:
> *Main> :load πρόχειρον.hs
> [1 of 1] Compiling Main ( ÏÏÎ
> ¿ÌÏειÏον.hs, interpreted )
>
> ÏÏοÌÏειÏον.hs:1:23:
> Not in scope: type constructor or class `Boo'
> Failed, modules loaded: none.
> Prelude>
It would be nice if the error messages at least showed correctly the
filename.
Maybe this has something to do with Haskeline?
Anyway thanks again,
Christos
On 18 Οκτ 2009, at 6:11 μ.μ., Don Stewart wrote:
> christosc:
>> I've noticed that when I load in GHCi a file that has a non-latin
>> name,
>> although it gets loaded, its name appears garbled in the message
>> after
>> the loading:
>>
>>> Prelude> :load πρόχειρον.hs
>>> [1 of 1] Compiling Main ( ÏÏÎ
>>> ¿ÌÏειÏον.hs,
>>> interpreted )
>>> Ok, modules loaded: Main.
>>> *Main>
>>
>> Is this expected, or something is wrong with my setup? It's a rather
>> insignificant issue, but I thought to ask about it.
>> I'm using GHC 6.12.1rc1 on Mac OS X 10.6.1.
>>
>
> Perhaps you're seeing the GHC support for locales in 6.12.
>
> http://ghcmutterings.wordpress.com/2009/09/30/heads-up-what-you-need-to-know-about-unicode-io-in-ghc-6-12-1/
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
More information about the Glasgow-haskell-users
mailing list