[Haskell-cafe] Has character changed in GHC 6.8?
Ian Lynagh
igloo at earth.li
Tue Jan 22 10:45:09 EST 2008
On Tue, Jan 22, 2008 at 03:16:15PM +0000, Magnus Therning wrote:
> On 1/22/08, Duncan Coutts <duncan.coutts at worc.ox.ac.uk> wrote:
> >
> >
> > On Tue, 2008-01-22 at 09:29 +0000, Magnus Therning wrote:
> > > I vaguely remember that in GHC 6.6 code like this
> > >
> > > length $ map ord "a string"
> > >
> > > being able able to generate a different answer than
> > >
> > > length "a string"
> >
> > That seems unlikely.
>
>
> Unlikely yes, yet I get the following in GHCi (ghc 6.6.1, the version
> currently in Debian Sid):
>
> > map ord "a"
> [97]
> > map ord "ö"
> [195,182]
In 6.6.1:
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.
Thanks
Ian
More information about the Haskell-Cafe
mailing list