[ ghc-Bugs-608378 ] Unicode bug in toUpper/toLower

noreply at sourceforge.net noreply at sourceforge.net
Thu Sep 12 09:44:05 EDT 2002


Bugs item #608378, was opened at 2002-09-12 13:44
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=608378&group_id=8032

Category: Prelude
Group: 5.04
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin Norbäck (norpan)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unicode bug in toUpper/toLower

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=608378&group_id=8032



More information about the Glasgow-haskell-bugs mailing list