[Y-devel] [PATCH] i18n - wchar_t properties

Alexey Boyko smartly at gala.net
Mon Feb 23 22:09:41 GMT 2004


> [snip]
> Does iconv not already perform this function?  (man 3 iconv)

Yes, but iconv may be slower.

> > I think, client libraries also must accept strings as wchar_t, convert
> > them into UTF-8 and pass to server
>
> If so, then what's the point of using UTF-8 at all -- if the clients are
> using it, and the server is using it, it's just an unnecessary
> conversion.

wchar_t can be machine dependent, for example big or little endian, UCS2 or 
UCS4, while UTF-8 independent of this. So using UTF-8 as transport encoding 
is a good way.

> Would it not make sense to use UTF-8 for everything, converting to UCS-4
> interally within any given component if there's a performance benefit?

Using wchar_t on client discards posibility to make non Unicode programs.
Working in strings in wchar_t easier, then strings in UTF-8




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved