[DragonFlyBSD - Bug #3284] Wrong towlower() result for U+038A

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Tue Jun 15 11:15:29 PDT 2021


Issue #3284 has been updated by swildner.


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.


----------------------------------------
Bug #3284: Wrong towlower() result for U+038A
http://bugs.dragonflybsd.org/issues/3284#change-14105

* Author: bhaible
* Status: New
* Priority: Normal
* Assignee: 
* Category: Userland
* Target version: 
----------------------------------------
How to reproduce: Run this program.
Expected output:
<pre>
wc1 uppercased = 0x038A, wc2 uppercased = 0x038A
wc1 lowercased = 0x03AF, wc2 lowercased = 0x03AF
</pre>
Actual output:
<pre>
wc1 uppercased = 0x038A, wc2 uppercased = 0x038A
wc1 lowercased = 0x03AF, wc2 lowercased = 0x03B0
</pre>

<pre>
#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;
}
</pre>




-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list