[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Draft] Writing i18n apps with glibc 2.2



>>>>> "Roger" == Roger So <rogerso@sis.dhs.org> writes:

    Roger> No, the point I was making was, say you have 0x20 0xD0 0xF6 (a
    Roger> space followed by some Big5 character).  First you check
    Roger> isprint(0x20); that succeeds, so you move on to isprint(0xD0).
    Roger> Oops, 0xD0 is not printable.  But MB_CUR_MAX = 2.  So we check it
    Roger> now with 2 bytes together ...  isprint(0xD0F6) ... great, that's
    Roger> printable, and we move on to the next byte ...

By the way, if the argument of isprint is still int, it will have a hard
time to deal with things like UTF8 on UCS-4, where MB_CUR_MAX = 6 (and thus
cannot be held in a single int)... ;P

Regards,
Isaac.

Attachment: pgp9bEQPaDm0e.pgp
Description: PGP signature


Reply to: