Skip to main content


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 14:37 Go to next message
Pepe Ciardelli is currently offline Pepe CiardelliFriend
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 15:07 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
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 15:32 Go to previous messageGo to next message
Pepe Ciardelli is currently offline Pepe CiardelliFriend
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 17:37 Go to previous messageGo to next message
Pepe Ciardelli is currently offline Pepe CiardelliFriend
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 05:52 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
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.
Re: Unicode - General OS question [message #1780678 is a reply to message #487841] Thu, 25 January 2018 16:31 Go to previous message
Nikolay Suschenko is currently offline Nikolay SuschenkoFriend
Messages: 2
Registered: October 2017
Junior Member
Try to add the line:
-Dfile.encoding=UTF-8

to your eclipse.ini file and reboot the Eclipse.
Previous Topic:No more handles [gtk_init_check() failed]
Next Topic:newbie questions: Navigator and projects
Goto Forum:
  


Current Time: Tue Apr 23 11:21:07 GMT 2024

Powered by FUDForum. Page generated in 0.04841 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top