On 02/24/2011 04:50 AM, Corinna Vinschen wrote: > On Feb 24 12:19, Bengt Larsson wrote: >> Bengt Larsson wrote: >>> I don't use surrogates. I only use UTF-8 and UTF-32. But using cygwin's >>> wcwidth may be worth thinking about. I suppose it will be consistent >>> with mintty that way; otherwise not? >> >> And: is wcwidth always available in modern Unices? How do you find out >> these things? I mean practically available. > > wcwidth and wcswidth are XSI extensions, so they are optional. As for > finding out, that's usally nicely done by autoconf'ing your project.
And if you don't mind [L]GPL licensing, gnulib provides a source code replacement that guarantees wide character support on all modern porting platforms (particularly useful for mingw, which is sorely lacking on this front); and is currently working on introducing a wwchar_t type that is guaranteed to be UTF-32 even on cygwin (this is how coreutils gets wide character support for things like wc). Portions of that gnulib code are incorporated into libunistring. But from the sounds of your program's license, I'm not sure you can take advantage of gnulib or libunistring. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature