Unicode bug in toUpper/toLower
Since GHC now does full unicode, toUpper ought to be
full Unicode also. According to the Haskell 98 Library
Report, section 9:
Function toUpper converts a letter to the corresponding
upper-case letter, leaving any other character
unchanged. Any Unicode letter which has an upper-case
equivalent is transformed.
I take as my example the character ÿ (which is the only
one I can write in iso-8859-1 by the way).
toUpper 'ÿ' ought to be unicode 0178 (hexadecimal). But
it's not
toUpper 'ÿ' gives 'ÿ'
toLower (toEnum 0x178) gives toEnum 0x178
I understand that this may cause more trouble than it's
worth, but either the report needs to be rewritten or
the implementation changed.
Trac metadata
Trac field |
Value |
Version |
5.04 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedFixed |
Component |
Prelude |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|