Re: Character properties

From: Marcin 'Qrczak' Kowalczyk (
Date: Sat Sep 23 2000 - 04:23:41 EDT

Fri, 22 Sep 2000 22:11:44 -0800 (GMT-0800), Roozbeh Pournader <> pisze:

> intToDigit should look at the locale to select the preferred digit
> form, I think.

Sorry, it cannot apply to Haskell, because it's a functional language.
It must work the same way all the time, unless it had a different

I am going to have isDigit and isAsciiDigit.

A framework for generic locale-dependent behavior is not designed yet.
The implementation of conversion between the default locale-dependent
byte encoding and Unicode will of course depend on the locale
internally - in its current design it is allowed. There is no external
interface to manual locale setting yet. Well, process-wide locale
setting is against the Haskell style, but I see no other convenient

What about definitions of other character predicates? They came
partially from my head, so may be incorrect or "incomplete".

                        * * *

What are best ways to implement the conversion between the
default locale-dependent byte encoding and Unicode on various
platforms? Especially ones to which the Glasgow Haskell Compiler
is currently ported:
  * i386-unknown-{linux,freebsd,netbsd,cygwin32,mingw32}
  * sparc-sun-solaris2
  * hppa1.1-hp-hpux{9,10}

I was told on the linux-utf8 mailing list that since the assumption
that wchar_t is Unicode is non-portable, the recommended generic way
is to use iconv, and carry an iconv implementation (like libiconv)
for platforms where it's not available. I don't like this very much,
but probably it's indeed the best way on Unices, and something
Windows-specific on Windows?

 __("<  Marcin Kowalczyk *
  ^^                      SYGNATURA ZASTĘPCZA

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:13 EDT