
23 Jan
2008
23 Jan
'08
9:45 a.m.
Peter Verswyvelen
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. -k -- If I haven't seen further, it is by standing in the footprints of giants