[Haskell-beginners] Re: Unicode in GHCi

Christos Chryssochoidis c.chryssochoidis at gmail.com
Wed Nov 12 06:35:12 EST 2008


Thank you for your response!
Indeed utf8-string works fine for printing and reading utf8 strings!
I would also like to use multibyte characters in GHCi, but as the guys
at #Haskell told me yesterday, GHCi 6.10.1 switched from using
readline for line edting to the editline lib, and the latter can't
handle unicode characters, at least for now. But in GHCi 6.8 and the
older versions there shouldn't be any problem with unicode characters
in GHCi.

Thanks very much again!

Christos

On Wed, Nov 12, 2008 at 9:11 AM, Ahn, Ki Yung <kyagrd at gmail.com> wrote:
> Christos Chryssochoidis wrote:
>>
>> Hello,
>>
>> I'd like to type in GHCi some non-latin characters, but when I try it,
>> no characters are inserted at all. Latin characters though are typed
>> in fine, and in any other shell except GHCi I try non-Latin characters
>> get typed without problem.
>
> You should use the utf8-string library to print multibyte string
> literals in GHC.
>
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string
>
> Linux distributions usually have this packaged.
> Otherwise, you can to install this using cabal.
>
> I am not sure whether there is a direct support for wide characters in
> Haskell.
>
>> I mean I'm not able to type in GHCi an expression like
>>
>> 'ᾶ' == 'ᾶ'    (can't type in the ᾶ)
>>
>> Is this a known GHCi restriction on the character set it accepts, or
>> something is wrong with my setup of GHCi/terminal?
>>
>> I'm using GHC 6.10.1 in Mac OS X Terminal.
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>


More information about the Beginners mailing list