From: "nickblack at linux dot com" <sourceware-bugzilla@sourceware.org>
To: libc-locales@sourceware.org
Subject: [Bug localedata/22744] wcwidth glibc issue for 0x2630 Unicode character
Date: Sun, 05 Jul 2020 17:13:21 +0000 [thread overview]
Message-ID: <bug-22744-716-FTZsyE6q5D@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-22744-716@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22744
nick black <nickblack at linux dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nickblack at linux dot com
--- Comment #1 from nick black <nickblack at linux dot com> ---
If I add a call to setlocale(LC_ALL, "") with a proper LANG environment
variable and installed locale data, I get the expected result (which is 1, and
agrees with modern utf8proc):
[schwarzgerat](0) $ cat test.c
#include <stdio.h>
#include <locale.h>
#include <wchar.h>
#include <utf8proc.h>
int main() {
setlocale(LC_ALL, "");
wint_t c = 0x2630;
printf("wcwidth returns %d\n", wcwidth(c));
printf("utf8proc_charwidth returns %d\n", utf8proc_charwidth(c));
return 0;
}
[schwarzgerat](0) $ gcc -D_XOPEN_SOURCE test.c -lutf8proc
[schwarzgerat](0) $ ./a.out
wcwidth returns 1
utf8proc_charwidth returns 1
[schwarzgerat](0) $
I believe this bug can be closed. The test program provided requires a
setlocale() call to produce the expected result.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2020-07-05 17:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-22744-716@http.sourceware.org/bugzilla/>
2018-01-24 16:14 ` jsm28 at gcc dot gnu.org
2020-07-05 17:13 ` nickblack at linux dot com [this message]
2020-07-05 17:27 ` schwab@linux-m68k.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-22744-716-FTZsyE6q5D@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=libc-locales@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).