[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: question about Unicode
- From: Klaus Ripke <paul-lua@...>
- Date: Mon, 4 Dec 2006 19:30:07 +0100
On Mon, Dec 04, 2006 at 04:05:46PM -0200, Roberto Ierusalimschy wrote:
> My question is, what is the "best" way to check char classes? Should I
> use mbtowc + iswctype? A hand-written utf8->wchat_t + iswctype?
I gather there is no "best" way.
The way slnunicode does it is optimized for size,
using a higly compressed unicode character class table (from Tcl)
and never requiring space for a UTF-16 version (unlike Tcl).
Anyway, wchar_t can be expected to do the job only in
implementations defining __STDC_ISO_10646__
- else it might be a 16bit value, which means trouble.