Project

General

Profile

Bug #3284

Wrong towlower() result for U+038A

Added by bhaible about 2 months ago. Updated 20 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Userland
Target version:
Start date:
06/14/2021
Due date:
% Done:

0%

Estimated time:

Description

How to reproduce: Run this program.
Expected output:

wc1 uppercased = 0x038A, wc2 uppercased = 0x038A
wc1 lowercased = 0x03AF, wc2 lowercased = 0x03AF

Actual output:
wc1 uppercased = 0x038A, wc2 uppercased = 0x038A
wc1 lowercased = 0x03AF, wc2 lowercased = 0x03B0

#include <locale.h>
#include <stdio.h>
#include <wchar.h>
#include <wctype.h>

int main ()
{
  if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL)
    return 1;
  wchar_t wc1 = 0x03AF; /* GREEK SMALL LETTER IOTA WITH TONOS */
  wchar_t wc2 = 0x038A; /* GREEK CAPITAL LETTER IOTA WITH TONOS */
  printf ("wc1 uppercased = 0x%04X, wc2 uppercased = 0x%04X\n", towupper (wc1), towupper (wc2));
  if (towupper (wc1) != towupper (wc2))
    return 2;
  printf ("wc1 lowercased = 0x%04X, wc2 lowercased = 0x%04X\n", towlower (wc1), towlower (wc2));
  if (towlower (wc1) != towlower (wc2))
    return 3;
}

History

#1

Updated by swildner about 1 month ago

An upgrade of our locale data to newer CLDR data will fix this issue. Your sample program gives the expected output here locally.

It will take me a bit to clean up what I have. Stay tuned.

#2

Updated by tuxillo 20 days ago

  • Target version set to 6.2

Also available in: Atom PDF