cvs commit: fptools/libraries/base/GHC Unicode.hsc Unicode.hi-boot
Simon Marlow
simonmar@glass.cse.ogi.edu
Wed, 20 Aug 2003 03:22:44 -0700
simonmar 2003/08/20 03:22:44 PDT
Added files:
libraries/base/GHC Unicode.hsc Unicode.hi-boot
Log:
Use the wide-char classifications from the C library if available.
This gives us Unicode-aware isLower, isUpper, isAlpha etc.
On Unix, you have to set your locale to something. This is usually
done by setting the environment variable LANG, eg.
export LANG=en
This stuff *should* also work on Windows, except that Windows uses a
16-bit wchar_t so will get it wrong for characters > '\xffff'. However,
I figured it was better to use the system-supplied functionality
rather than trying to implement this stuff ourselves.