Community
Participate
Working Groups
Build Identifier: Version: 4.2.0 Build id: I20120315-1300 1. Double-byte and four-byte characters are displayed as garbage code if encoding of the JRE definition file is utf-8 2. DBCS characters could be displayed properly if encoding of the JRE definition file is ANSI 3. As 4-byte GB18030 characters couldn't be saved in an ANSI encoding file, it's needed to use utf-8/unicode encoding file to support 4-byte GB18030 characters. 4. If encoding of the JRE definition file is unicode(utf-16), an error will occurred even if there are only single byte characters in the file. Reproducible: Always Steps to Reproduce: 1. Open Eclipse SDK 2. Select from menu Window->Preferences->Java->Installed JREs 3. Click Add button 4. Select Execution Environment Description as JRE Type 5. Click File button to select a utf-8 encoding .ee file that contains GB18030 characters 6. Check characters in the JRE name and Default VM arguments fields
Created attachment 215454 [details] DBCS characters are displayed as garbage code.
Created attachment 215455 [details] Test .ee files and screenshots
I assume you are on an OS that does not have UTF-8 by default. We can either use the workspace encoding instead of the platform encoding or do a more complete fix by allowing to specify the encoding of the file.
We should allow to set the encoding. Default should be the workspace encoding.
(In reply to comment #3) > I assume you are on an OS that does not have UTF-8 by default. > > We can either use the workspace encoding instead of the platform encoding or do > a more complete fix by allowing to specify the encoding of the file. Yes, I used Windows 7(Simplified Chinese) in my test. Default Text encoding is "Default(GB18030)" in Window->Preference->General->Workspace. I have tried to change local to en-us, Default Text encoding was changed to Cp1252. So, could you kindly let me know how set OS to have UTF-8 by default? Many thank.
(In reply to comment #5) > (In reply to comment #3) > > I assume you are on an OS that does not have UTF-8 by default. > > > > We can either use the workspace encoding instead of the platform encoding or do > > a more complete fix by allowing to specify the encoding of the file. > > Yes, I used Windows 7(Simplified Chinese) in my test. Default Text encoding is > "Default(GB18030)" in Window->Preference->General->Workspace. > > I have tried to change local to en-us, Default Text encoding was changed to > Cp1252. So, could you kindly let me know how set OS to have UTF-8 by default? > Many thank. AFAIK you can't change the encoding that Windows picks for each locale.
The usual scenario is to select a file that has been crafted in your OS. Using a file from a different OS with a different encoding is not common and so far no one has ever requested to support this. We have no plans to work in this in the near future.
(In reply to comment #6) > AFAIK you can't change the encoding that Windows picks for each locale. Thank you, Dani. I have tried to use gb18030(default encoding) as encoding of .ee file, it works fine for all GB18030 characters. So, this bug will not block GB18030 testing.