RE: unicode on Linux

From: Shao, Yiying (
Date: Tue Oct 28 2003 - 10:59:10 CST

Thanks for your info. What I really trying to do is:

*Using ICU, which uses UTF-16, to handle all strings for cross platform localization.

*since UTF-8 is the default locale for Red Hat Linux, so I need to convert the strings from UTF-16 to UTF-8. But UTF-8 is not the default locale for CJK. So, on CJK, I need to set UTF-8 as the default locale, the converted UFT-8 can still work with CJK.

*Or there may be other better ways to do this? If it is possible to find out the current default locale encoding (such as UTF-16, UTF-8, multi-byte and etc.) at run time for an App, then according the current locale, do the correct conversions? ICU provides rich conversion utilities. This way, I can guaranty that my App will work properly and will not screw up other Apps on the same system.


-----Original Message-----
From: Edward H Trager []
Sent: Tuesday, October 28, 2003 8:25 AM
To: Shao, Yiying
Subject: RE: unicode on Linux

Hi Yiying,

On Mon, 27 Oct 2003, Shao, Yiying wrote:

> >>On Red Hat Linux, if UTF-8 is not made as the default encoding for Chnese/Japanese/Korean, what it is using for those double byte languages?
> >The old multi-byte character sets.
> for CJK, can UTF-8 to be set to the local for an App programatically without affecting other apps?

Yes, you can start any app with a customized environment, i.e.:

prompt%> LANG=zh-CN.UTF-8 yourApp &

Is this what you are asking?

> >>Does later Red Had Linux makes the UTF-8 the default encoding for them?
> >AFAIK only if you manually set it to a UTF-8 locale, e.g.
> >LANG=zh-CN.UTF-8. Notice, though, that some older software will not be
> >aware of this change, so many characters will not be displayed >properly.

This archive was generated by hypermail 2.1.5 : Thu Jan 18 2007 - 15:54:25 CST