Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Unicode - General OS question
Unicode - General OS question [message #487841] Thu, 24 September 2009 10:37 Go to next message
Pepe Ciardelli is currently offline Pepe Ciardelli
Messages: 12
Registered: July 2009
Junior Member
Hi there,

The RCP application we are building will use a great deal of unicode, Armenian alphabets and what have you.

As a test, I attempted to paste the character "♀" in a SWT Text field in an instance of our application running on my Windows machine (didn't work) and then on the Mac machine of a colleague (success). I can paste it successfully in Word, Firefox, etc. on my Windows.

Note that this has (as yet) nothing to do with using unicode in a file being edited - hence, the VM arguments "-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8" unsurprisingly have no effect.

What am I missing here? What determines whether an instance of an RCP application - above all its SWT Controls - can handle unicode?

Many thanks in advance,
Pepe Ciardelli
Re: Unicode - General OS question [message #487852 is a reply to message #487841] Thu, 24 September 2009 11:07 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
Pepe Ciardelli wrote:
> Hi there,
>
> The RCP application we are building will use a great deal of unicode,
> Armenian alphabets and what have you.
> As a test, I attempted to paste the character "♀" in a SWT Text field
> in an instance of our application running on my Windows machine
> (didn't work)
Make sure that the font you use contains that character.

Dani
> and then on the Mac machine of a colleague (success). I can paste it
> successfully in Word, Firefox, etc. on my Windows.
>
> Note that this has (as yet) nothing to do with using unicode in a file
> being edited - hence, the VM arguments "-Dfile.encoding=UTF-8
> -Dsun.jnu.encoding=UTF-8" unsurprisingly have no effect.
>
> What am I missing here? What determines whether an instance of an RCP
> application - above all its SWT Controls - can handle unicode?
>
> Many thanks in advance,
> Pepe Ciardelli
Re: Unicode - General OS question [message #487867 is a reply to message #487852] Thu, 24 September 2009 11:32 Go to previous messageGo to next message
Pepe Ciardelli is currently offline Pepe Ciardelli
Messages: 12
Registered: July 2009
Junior Member
Aha, indeed! Thanks very much.

The obvious followup question then: is there a way to change the default text for all controls from the default system font to something unicode-compliant in one fell swoop?
Re: Unicode - General OS question [message #487890 is a reply to message #487867] Thu, 24 September 2009 13:37 Go to previous messageGo to next message
Pepe Ciardelli is currently offline Pepe Ciardelli
Messages: 12
Registered: July 2009
Junior Member
Just wanted to share what I found:

SWT controls set their font with Display#getSystemFont() and there's no way to set a different default font for all controls. Therefore, the appearance settings on Windows machines that don't have a unicode-compliant system font must be changed.

The first step is to make sure that a unicode-compliant font is installed on the user's Windows system. This explains how: http://unicode.org/help/display_problems.html.

Then do the following:

1. Right-click on desktop
2. Choose "Properties"
3. Appearance -> Advanced (this is where you want to be: http://delltech.150m.com/XP/desktop/desktop.advanced.png)
4. Item: "Message Box"
5. Font: Arial Unicode MS

After settings are updated, unicode will be visible in Eclipse applications.
Re: Unicode - General OS question [message #487962 is a reply to message #487890] Fri, 25 September 2009 01:52 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
Pepe Ciardelli wrote:
> Just wanted to share what I found:
>
> SWT controls set their font with Display#getSystemFont() and there's
> no way to set a different default font for all controls. Therefore,
> the appearance settings on Windows machines that don't have a
> unicode-compliant system font must be changed.
Or you change your default OS font. SWT will pick that up.

Dani
>
> The first step is to make sure that a unicode-compliant font is
> installed on the user's Windows system. This explains how:
> http://unicode.org/help/display_problems.html.
>
> Then do the following:
>
> 1. Right-click on desktop
> 2. Choose "Properties"
> 3. Appearance -> Advanced (this is where you want to be:
> http://delltech.150m.com/XP/desktop/desktop.advanced.png)
> 4. Item: "Message Box"
> 5. Font: Arial Unicode MS
> After settings are updated, unicode will be visible in Eclipse
> applications.
Previous Topic:Eclipse php (galileo) - problems!!
Next Topic:[PDE Build] Ant customcallback not working when plugin is packaged
Goto Forum:
  


Current Time: Thu Apr 17 05:44:17 EDT 2014

Powered by FUDForum. Page generated in 0.01557 seconds