Encoding in SWT Designer

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Encoding in SWT Designer

Postby peica » Tue Feb 22, 2011 2:17 am

Hi,

I use the WindowBuilder Pro beta to build my SWT Form to support Chinese language in UTF-8. All works fine until today, I found it convert my string into not raw unicode string format('\u1234'). For example, I need it represent the 'A' as '\u0410'. But it convert all string to 'A'.

Is there any configuration to control this behavior?

I use the 0.9.0.r36x201102111 on Eclipse 3.6.1.

Thanks.
peica
 
Posts: 4
Joined: Tue Feb 22, 2011 2:06 am

Re: Encoding in SWT Designer

Postby Eric Clayberg » Tue Feb 22, 2011 4:26 am

Have you set your project properties to use UTF-8?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Encoding in SWT Designer

Postby peica » Tue Feb 22, 2011 4:31 am

I have set all file encoding as UTF-8. I found something strange . I open another instance of Eclipse, and the new one is OK. I am working on MAC OS 10.6.
peica
 
Posts: 4
Joined: Tue Feb 22, 2011 2:06 am

Re: Encoding in SWT Designer

Postby Eric Clayberg » Tue Feb 22, 2011 4:50 am

Sounds like it doesn't have anything to do with SWT Designer in that case.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Encoding in SWT Designer

Postby peica » Tue Feb 22, 2011 5:11 am

What do you mean? Is there any facility to trace it?
peica
 
Posts: 4
Joined: Tue Feb 22, 2011 2:06 am

Re: Encoding in SWT Designer

Postby peica » Tue Feb 22, 2011 7:31 am

The problem like the messages.properties file should be save as ISO-8859-1. Or something inside Eclipse would change the unicode escape code into the related characters , I am not sure if it is the WindowBuilder.
peica
 
Posts: 4
Joined: Tue Feb 22, 2011 2:06 am

Re: Encoding in SWT Designer

Postby Eric Clayberg » Tue Feb 22, 2011 6:21 pm

WindowBuilder will generate text according to the encoding properties fo the file.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

cron