[Debburn-devel] Sample mini-iconv (Was: What can I assume about libc?

Peter Samuelson peter at p12n.org
Fri Oct 6 01:08:00 UTC 2006


[Lorenz Minder]
>   #if defined(__STDC_ISO_10646__)
>           return iswprint((wchar_t)c);
>   #else

Ooooh.  I didn't know about __STDC_ISO_10646__.  On the other hand, I
imagine that relying on __STDC_ISO_10646__ is approximately equivalent
to relying on the existence of iswprint(), portability-wise, so we
don't really gain anything.

>           if(c < 256) {
>                   return isprint((int)c);

To the best of my knowledge, wchar_t between 0 and 255 are not
guaranteed to be equivalent to unsigned char.  Of course, it may be
true in practice.

The correct answer for all of this is probably libicu.  But that would
be another external dependency, and currently a somewhat volatile one,
so I'm not excited about that either.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/debburn-devel/attachments/20061005/042bdea7/attachment.pgp


More information about the Debburn-devel mailing list