logo       

[ ghc-Bugs-608378 ] Unicode bug in toUpper/toLower: msg#00035

lang.haskell.glasgow.bugs

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

Bugs item #608378, was opened at 2002-09-12 13:44
Message generated for change (Settings changed) made by simonmar
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=608378&group_id=8032

Category: Prelude
Group: 5.04
>Status: Closed
>Resolution: Fixed
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.

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

>Comment By: Simon Marlow (simonmar)
Date: 2003-08-20 10:08

Message:
Logged In: YES
user_id=48280

This is now fixed in the HEAD.

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

Comment By: Simon Marlow (simonmar)
Date: 2002-09-12 14:31

Message:
Logged In: YES
user_id=48280

GHC doesn't support Unicode in any real sense. The Char
type is 32 bits, but the rest of the system really only works
with the ISO 8859 character set.

Nonetheless, I'll leave the bug report here as a reminder :-)


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

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise