cvs commit: fptools/libraries/base/GHC Read.lhs Show.lhs
fptools/libraries/base/Text/ParserCombinators ReadP.hs fptools/libraries/b
ase/Text/Read Lex.hs fptools/libraries/base/include HsBase.h
fptools/libraries/base/Data Char.hs List.hs
Simon Marlow
simonmar@glass.cse.ogi.edu
Tue, 19 Aug 2003 09:39:14 -0700
simonmar 2003/08/19 09:39:14 PDT
Modified files:
libraries/base/GHC Read.lhs Show.lhs
libraries/base/Text/ParserCombinators ReadP.hs
libraries/base/Text/Read Lex.hs
libraries/base/include HsBase.h
libraries/base/Data Char.hs List.hs
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.
Revision Changes Path
1.21 +3 -2 fptools/libraries/base/GHC/Read.lhs
1.8 +14 -143 fptools/libraries/base/GHC/Show.lhs
1.15 +1 -1 fptools/libraries/base/Text/ParserCombinators/ReadP.hs
1.13 +2 -1 fptools/libraries/base/Text/Read/Lex.hs
1.23 +4 -1 fptools/libraries/base/include/HsBase.h
1.10 +10 -0 fptools/libraries/base/Data/Char.hs
1.17 +47 -1 fptools/libraries/base/Data/List.hs