Project

General

Profile

Bug #992

towlower/towupper are broken

Added by Yuri Pankov almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
locale - data and messages
Start date:
2011-05-04
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

$ cat tow-test.c
#include <locale.h>
#include <stdio.h>
#include <wchar.h>

int
main(void) {
        wint_t  rusP = 0x41f;
        wint_t  rusp = 0x43f;

        setlocale(LC_ALL, "");

        printf("towlower: %lc -> %lc\n", rusP, towlower(rusP));
        printf("towupper: %lc -> %lc\n", rusp, towupper(rusp));

        return (0);
}

Illumos:
$ LC_ALL=en_US.UTF-8 ./tow-test
towlower: П -> П
towupper: п -> п
$ LC_ALL=ru_RU.UTF-8 ./tow-test
towlower: П -> П
towupper: п -> П

Solaris 11:
$ LC_ALL=en_US.UTF-8 ./tow-test
towlower: П -> п
towupper: п -> П
$ LC_ALL=ru_RU.UTF-8 ./tow-test
towlower: П -> п
towupper: п -> П

FreeBSD 8:
$ LC_ALL=en_US.UTF-8 ./tow-test
towlower: П -> п
towupper: п -> П
$ LC_ALL=ru_RU.UTF-8 ./tow-test
towlower: П -> п
towupper: п -> П

The letter is cyrillic 'pe' (just as an example, problem isn't limited to it).
I'm not sure if towlower/towupper are actually at fault here or problem is deeper and setting Garrett as assignee as he was working on it.


Related issues

Blocks illumos gate - Feature #1146: find should support -inameResolvedYuri Pankov2011-06-24

Actions

Also available in: Atom PDF