Bug 21325 - tolower/toupper in tr_TR locale.
tolower/toupper in tr_TR locale.
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-25 09:08 EST by Sam Varshavchik
Modified: 2016-11-24 09:58 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-25 09:08:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sam Varshavchik 2000-11-25 09:08:43 EST
Consider this:

       setlocale(LC_ALL, "tr_TR");
   
        printf ("%c\n", tolower('I'));
 

This produces the character code 0xFD, instead of the lowercase 'i', 0x69.

In /usr/share/locale/locale.alias we have:

turkish         tr_TR.ISO-8859-9

In http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-9.TXT we have:

0x49    0x0049  #       LATIN CAPITAL LETTER I

Code 0x49 in iso-8859-9 is still latin uppercase 'I', unicode 0x0049, and
its lowercase equivalent is still 0x0069, code 0x69, so what is tolower()
doing here?
Comment 1 Jakub Jelinek 2000-11-27 08:21:20 EST
Read the mapping again, you'll find that Turkish has also
LATIN CAPITAL LETTER I WITH DOT ABOVE (that is toupper('i'))
and LATIN SMALL LETTER DOTLESS I (that is tolower('I')).

Note You need to log in before you can comment on or make changes to this bug.