Project

General

Profile

Actions

Bug #3284

open

Wrong towlower() result for U+038A

Added by bhaible almost 3 years ago. Updated over 2 years 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;
}
Actions #1

Updated by swildner almost 3 years 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.

Actions #2

Updated by tuxillo over 2 years ago

  • Target version set to 6.2
Actions

Also available in: Atom PDF