harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Regis <xu.re...@gmail.com>
Subject Re: Shall we change our file.encoding
Date Tue, 14 Jul 2009 10:50:36 GMT
Charles Lee wrote:
> Hi guys:
> 
> I am doing some test cases on the ant junit test case and meeting some
> encoding problems. I find they are maybe caused by the different default
> encoding from RI and harmony. My local is en_US.UTF-8, RI default is UTF-8
> but harmony is 8859-1. And then I have encountered
> HARMONY-3736<https://issues.apache.org/jira/browse/HARMONY-3736>,
> and the two diffs attached on that issue. It seems we always get 8859-1.
> Because: (correct me if wrong :-)
> 
> 1. we remove the set code in the vm. we will always get null if we call vm
> method
> 2. we set the file.encode in the libglob.c, if we got null from vm, we set
> 8859-1.
> 3. we can not set file.encode on the run time.
> 
> ant use UTF-8 to encode filename which contains the non-ascii character.
> So why we use iso8859-1 as our unchangeable default?
>>>From the wiki http://en.wikipedia.org/wiki/ISO8859-1, it says "In computing
> applications, encodings that provide full UCS support (such as
> UTF-8<http://en.wikipedia.org/wiki/UTF-8>and
> UTF-16 <http://en.wikipedia.org/wiki/UTF-16>) are finding increasing favor
> over encodings based on ISO 8859-1." Should we simply change iso8859-1 to
> utf-8?
> 

I suppose default encoding should get from system locale, simply changing 
iso8859-1 to utf-8 doesn't resolve this problem. If vm didn't do this, I think, 
classlib could get locale info from OS and set "file.encode" property properly.


-- 
Best Regards,
Regis.

Mime
View raw message