Re: iswprint() and wcwidth() don't work properly on some platforms with certain unicodes

2018-09-04 Thread Bruno Haible
Eric Blake wrote: > > variable > >gl_cv_func_wcwidth_works=no > > at configure time. > > ... it is not a wise idea to codify > that into libvirt's configure.ac (or any other project). Yes, I agree. > Rather, if libvirt is hitting test failures due solely to the difference > of Unicode vers

Re: iswprint() and wcwidth() don't work properly on some platforms with certain unicodes

2018-09-04 Thread Eric Blake
On 08/31/2018 12:42 PM, Bruno Haible wrote: Yes. This particular character (U+1F600) was added in Unicode 6.1 [1][2]. The iswprint() function is implemented in the libc, which is why you see differences across platforms. After a new Unicode release is made, it takes some time until the picks it

Re: iswprint() and wcwidth() don't work properly on some platforms with certain unicodes

2018-08-31 Thread Bruno Haible
Simon Kobyda wrote: > It seems that functions gnulib's functions iswprint() and > wcwidth() return different results on different platforms. > > Code on Fedora 28: > > wchar_t c = L'😀' ; > if (iswprint(c)) > printf("Printable\n"); > else > printf("Not printable\n"); >

Re: iswprint() and wcwidth() don't work properly on some platforms with certain unicodes

2018-08-31 Thread Paul Eggert
Simon Kobyda wrote: Hello. It seems that functions gnulib's functions iswprint() and wcwidth() return different results on different platforms. Surely this is an issue of the platform's locales, not of Gnulib itself. Older platforms won't recognize newer characters, and some locales are simply

iswprint() and wcwidth() don't work properly on some platforms with certain unicodes

2018-08-31 Thread Simon Kobyda
Hello. It seems that functions gnulib's functions iswprint() and wcwidth() return different results on different platforms. Code on Fedora 28: wchar_t c = L'😀' ; if (iswprint(c)) printf("Printable\n"); else printf("Not printable\n"); Output: "Printable" Code on CentO