On Sat, Jun 02, 2001 at 08:33:59PM -0400, Michael B. Allen wrote:
> > I would advise you against using UCS-2, as it is only a partial
> > solution. Use UCS-4 instead. It has recently been approved in ISO
> > to add characters in ISO 10646 beyond the 64 k.
> 
> I would but the protocol of the server I'm writing uses UCS-2LE for
> all strings wherever possible (usernames, pathnames etc). Since I don't
> gain anything by using UCS-4 if the wire-format won't carry it, and for
> reasons of efficiency, I felt playing along with the UCS-2 was best. I'm
> only being cautious (and curious) about wchar_t (wprintf function for
> logging perhaps). Do you still see any reson to convert to a type that
> is 2x the size? I have to admit I've only just become familiar with all
> this character encoding stuff. It's interesting though! I like your FAQ
> Markus; great document.

If it is only internally in your program, I would advise a 32-bit wchar_t.
Strings do not make use of much processing space, typically, and
it is easier to handle characters one by one. Some languages, eg C and C++
do not have support for UCS-16. But it depends naturally on
how costly space is for you.

Kind regrads
Keld
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to