[Haskell-cafe] Re: Character predicates

Ketil Malde ketil+haskell at ii.uib.no
Wed Jan 12 02:30:02 EST 2005

Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> writes:

> Dimitry Golubovsky <dimitry at golubovsky.org> writes:

[Proposal: ASCII.isDigit is true for '0'..'9', Unicode.isDigit is true
for whatever Unicode defines as digits]

>> So there might be a bunch of (perhaps autogenerated, from localedef
>> files) modules for each locale/encoding, like ISO8859_1 or KOI_8.

> I disagree. Char is supposed to mean Unicode only, and data is
> converted to Unicode on boundaries with those parts of the world which
> use different encodings.

...and uppercase chars in KOI_8 is a subset of uppercase chars in
Unicode, so a KOI_8-specific isUpper would be superflous(?)

My intention was only to separate between (the traditional)
ASCII and (our modern day tower of Babel) Unicode.  One possibility
could be to have locale-modules apply to (raw) Word8 data -- so
somebody writing for KOI_8 could avoid converting to UC Char at all.
I'm not sure this is something we want, though.

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

More information about the Haskell-Cafe mailing list