On Tue, Aug 17, 2010 at 13:29, Ketil Malde <ke...@malde.org> wrote:

> Tako Schotanus <t...@codejive.org> writes:
>
> >> Just like Char is capable of encoding any valid Unicode codepoint.
>
> > Unless a Char in Haskell is 32 bits (or at least more than 16 bits) it
> con
> > NOT encode all Unicode points.
>
> And since it can encode (or rather, represent) any valid Unicode
> codepoint, it follows that it is 32 bits (and at least more than 16
> bits).
>
> :-)
>
> (Char is basically a 32bit value, limited valid Unicode code points, so
> it corresponds to UCS-4/UTF-32.)
>
>
Yeah, I tried looking it up but I could find the technical definition for
Char, but in the end I found that "maxBound" was "0x10FFFF" making it
basically 24 bits :)

I know for example that Java uses only 16 bits for its Chars and therefore
can NOT give you all Unicode code points with a single Char, with Strings
you can because of the extension points.

-Tako
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to