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

Re: [Draft] Writing i18n apps with glibc 2.2

On Mon, Oct 16, 2000 at 08:21:34PM +1100, Roger So wrote:
> So, given a stream of bytes which might contain multibyte characters,
> how would I test whether a byte is, say, printable?  Do I need to test
> for MB_CUR_MIN to MB_CUR_MAX number of bytes instead of individual
> bytes?  (seems wildly inefficient ...)

You need to convert the multibyte stream to widechar stream, and work
with widechars using iswprint.

> Also, in glibc, are widechars always in Unicode? (UCS-4?)

Yes, currently glibc use ucs4 to represent widechar internally. However
we'd better not to make any assumption when writing a program.

> Then zh_HK should copy "zh_CN" instead ...?

I'd love to see that :).

> I shall have a closer look.  Also it seems that an en_HK locale would be
> nice for people like me :)

Then, go ahead make one. It shouldn't be too much different from en_GB, right?


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

| This message was re-posted from debian-chinese-gb@lists.debian.org
| and converted from gb2312 to big5 by an automatic gateway.

Reply to: