On 1/22/08, <b class="gmail_sendername">Ian Lynagh</b> <<a href="mailto:igloo@earth.li">igloo@earth.li</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Jan 22, 2008 at 03:16:15PM +0000, Magnus Therning wrote:<br>> On 1/22/08, Duncan Coutts <<a href="mailto:duncan.coutts@worc.ox.ac.uk">duncan.coutts@worc.ox.ac.uk</a>> wrote:<br>> ><br>> ><br>> > On Tue, 2008-01-22 at 09:29 +0000, Magnus Therning wrote:
<br>> > > I vaguely remember that in GHC 6.6 code like this<br>> > ><br>> > > length $ map ord "a string"<br>> > ><br>> > > being able able to generate a different answer than
<br>> > ><br>> > > length "a string"<br>> ><br>> > That seems unlikely.<br>><br>><br>> Unlikely yes, yet I get the following in GHCi (ghc 6.6.1, the version<br>> currently in Debian Sid):
<br>><br>> > map ord "a"<br>> [97]<br>> > map ord "ö"<br>> [195,182]<br><br>In 6.6.1:<br><br>Prelude Data.Char> map ord "ö"<br>[195,182]<br>Prelude Data.Char> length "ö"
<br>2<br><br>there are actually 2 bytes there, but your terminal is showing them as<br>one character.</blockquote><div><br>Yes, of course, stupid me. But it is still the UTF-8 representation of "ö", not Latin-1, and this brings me back to my original question, is this an intentional change in
6.8?<br><br>> map ord "ö"<br>[246]<br>> map ord "åɓz𝐀"<br>[229,595,65370,119808]<br><br>6.8 produces Unicode code points rather then a particular encoding.<br><br>/M</div></div>