[Bug 251767] wcswidth() from libc reports wrong string lenght (no unicode 9 support)
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Dec 12 14:23:40 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251767
--- Comment #3 from dmilith <dmilith at me.com> ---
Ok, it's not that easy.
I rebuilt my system from stable/12 with widths.txt from CURRENT as you
suggested… but it didn't help. Here's my example C code that prints "length 1"
for multibyte long char:
```C
#include <stdio.h>
#include <stddef.h>
#include <wchar.h>
#include <locale.h>
int main () {
setlocale(LC_ALL, "en_US.UTF-8");
const wchar_t* wc = L"👌";
int length = wcswidth(wc, 1);
printf("%ls, length: %d\n", wc, length);
}
```
outputs:
👌, length: 1
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-bugs
mailing list