public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug localedata/22744] wcwidth glibc issue for 0x2630 Unicode character
[not found] <bug-22744-131@http.sourceware.org/bugzilla/>
@ 2020-07-05 17:13 ` nickblack at linux dot com
2020-07-05 17:27 ` schwab@linux-m68k.org
1 sibling, 0 replies; 2+ messages in thread
From: nickblack at linux dot com @ 2020-07-05 17:13 UTC (permalink / raw)
To: glibc-bugs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug localedata/22744] wcwidth glibc issue for 0x2630 Unicode character
[not found] <bug-22744-131@http.sourceware.org/bugzilla/>
2020-07-05 17:13 ` [Bug localedata/22744] wcwidth glibc issue for 0x2630 Unicode character nickblack at linux dot com
@ 2020-07-05 17:27 ` schwab@linux-m68k.org
1 sibling, 0 replies; 2+ messages in thread
From: schwab@linux-m68k.org @ 2020-07-05 17:27 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=22744
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
Without setlocale, you are using the C locale, with the ASCII codeset.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-05 17:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-22744-131@http.sourceware.org/bugzilla/>
2020-07-05 17:13 ` [Bug localedata/22744] wcwidth glibc issue for 0x2630 Unicode character nickblack at linux dot com
2020-07-05 17:27 ` schwab@linux-m68k.org
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).