[Haskell-cafe] Has character changed in GHC 6.8?

Ketil Malde ketil+haskell at ii.uib.no
Wed Jan 23 04:45:41 EST 2008

Peter Verswyvelen <bf3 at telenet.be> writes:

>> Prelude Data.Char> map ord "ö"
>> [195,182]
>> Prelude Data.Char> length "ö"
>> 2

>> there are actually 2 bytes there, but your terminal is showing them as
>> one character.

> So let's all switch to unicode ASAP and leave that horrible
> multi-byte-string-thing behind us?

You are being ironic, I take it?

Unicode by its nature implies multi-byte chars, it's just a question
of how they are encoded: UTF-8 (one or more bytes, variable), UTF-16
(two or four, variable), or UCS-4 (or should it be UTF-32? - four
bytes, fixed).  The problem here is that while terminal software have
been UTF-8 for some time, GHC only recently caught up.

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list