NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/57798: With src/share/locale/ctype/en_US.UTF-8.src, wcwidth() returns 3 when ja_JP.UTF-8 locale is used



The following reply was made to PR lib/57798; it has been noted by GNATS.

From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost, lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: lib/57798: With src/share/locale/ctype/en_US.UTF-8.src, wcwidth()
 returns 3 when ja_JP.UTF-8 locale is used
Date: Wed, 27 Dec 2023 22:52:04 +0900

 å?? (U+5146) is a Chinese symbol for 1,000,000,000,000.
 
 I've confirmed that wcwidth(3) wrongly returns 3 for U+5146.
 while it correctly returns 2 for å?? (U+5140: 100,000,000).
 
 wcwidth(3) also returns 3 for U+16B60 (a Pahawn Hmong
 character for 10,000,000,000).
 
 These failures should be due to broken TODIGIT supports in
 mklocale(1). Its man page says:
 
  > TODIGIT    Defines a map from runes to their digit value.
  >            (snip) Only values up to 255 are allowed.
 
 OpenBSD has already dropped support to TODIGIT from mklocale(1):
 https://github.com/OpenBSD/src/commit/4efe9bdeb34
 
 If this commit is mechanically applied to netbsd-10,
 wcwidth(3) correctly reports 2 for U+5146.
 
 I will commit it and send a pullup request to netbsd-10,
 if there's no objections.
 
 Thanks,
 rin
 


Home | Main Index | Thread Index | Old Index