Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367592 - Error encoding when using the widgets includes double character text
Summary: Error encoding when using the widgets includes double character text
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 369368 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-28 02:12 EST by fahua jin CLA
Modified: 2017-02-23 14:18 EST (History)
5 users (show)

See Also:


Attachments
The sample project. (17.39 KB, application/x-zip)
2011-12-28 02:14 EST, fahua jin CLA
no flags Details
New test case (5.02 KB, application/x-zip-compressed)
2011-12-29 02:20 EST, Huang Ji Yong CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2011-12-28 02:12:55 EST
Build Identifier: 0.7 GA build

1) Setup the attached TestProject, and open the H1.egl.
2) You can find that the text in the H1 is not displayed correctly, while you open the W1, you can find that the text is displayed correctly.

Reproducible: Always
Comment 1 fahua jin CLA 2011-12-28 02:14:04 EST
Created attachment 208817 [details]
The sample project.
Comment 2 fahua jin CLA 2011-12-28 02:16:19 EST
The text file encoding is GBK, which is the default char setting of my system.
Comment 3 Huang Ji Yong CLA 2011-12-29 02:20:47 EST
Created attachment 208839 [details]
New test case
Comment 4 Huang Ji Yong CLA 2011-12-29 02:26:13 EST
Hi Paul,

I think the generated IR is wrong for the string of unicode charactors.
I attach a new test case.
To reproduce the problem, please follow the steps
1. Import the new test project. Set the encoding of the project to UTF-8. There is a RUI handler h1.egl. In which a string leteral s is set to a chinese charater string 中国.
2. Clean the project. Open the generated IR file t367592/EGLBin/client/h1.eglxml. In line 44
<RHS ID="24" eClass="org.eclipse.edt.mof.egl.StringLiteral" value="??" isHex="false" >
The string value is not correct.

Please have a look. Thanks.
Comment 5 Paul Harmon CLA 2012-01-09 14:14:32 EST
The problem occurred because the encoding of the xml IR files was set to iso-8859-1. This encoding only supports SBCS characters.

I have changed the code to set the encoding to UTF-8, which (in theory), supports all unicode characters.

I have updated the following java files for this:
AbstractObjectStore
XMLSerializer

additionally, i recompiled the system IRs and released the updated archives:
edtcompiler.eglar
egl.mofar
Comment 6 fahua jin CLA 2012-01-16 21:19:31 EST
Verified in 0.8.0.v201201150902-1CT-Fiv5_M5_LOPfUa4.
Comment 7 Brian Svihovec CLA 2012-01-23 11:16:39 EST
*** Bug 369368 has been marked as a duplicate of this bug. ***