Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] UTF-8 support and compliant components

Tahoma does show the all the right glyphs for my test case, when
the file.encoding of the VM used by Eclipse is in UTF-8 mode.

Andre

Knut Radloff wrote:



Yes, since we found that System.out is mangling the text it makes sense (if
you give it some thought) that you have to run the test program using the
proper encoding setting.
I'm guessing the reason you have to set the system property for the outer
Eclipse is that the console is testing the file.encoding property and not
the Eclipse setting. Otherwise it should be sufficient to change the
Workbench/Editors encoding setting. Can someone from the debug team comment
on this?
I wonder if we should have a more global encoding setting. Currently it
wouldn't even be intuitive to change the Workbench/Editors encoding
setting.

On my machine all glyphs are displayed properly, including the Chinese
ones. I use the default system font (Tahoma) for the console. I don't think
Eclipse or SWT can or should fall back on some other font if the currently
set font does not have all glyphs needed to render a particular string. I
don't know how Mozilla does this but it sounds slow.
Can you confirm that you see the correct glyphs if you select "Use System
Font" in the Workbench/Fonts preferences for the debug console.

Knut


|---------+---------------------------------->
|         |           Andre John Mas         |
|         |           <ajmas@xxxxxxxxxxxxxxxx|
|         |           >                      |
|         |           Sent by:               |
|         |           platform-swt-dev-admin@|
|         |           eclipse.org            |
|         |                                  |
|         |                                  |
|         |           04/25/2003 02:37 PM    |
|         |           Please respond to      |
|         |           platform-swt-dev       |
|         |                                  |
|---------+---------------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                              |
  |       To:       platform-swt-dev@xxxxxxxxxxx                                                                                 |
  |       cc:                                                                                                                    |
  |       Subject:  Re: [platform-swt-dev] UTF-8 support and compliant components                                                |
  |                                                                                                                              |
  >------------------------------------------------------------------------------------------------------------------------------|




If forgot something obvious, setting the -D option on the VM of
the subprocess too. This gets me the following:

    123-g5Ξ㈯冓

So it works. Though while the copy and paste shows all the characters
correctly the last two were represented as boxes in the console,
indicative that the font used in the console probably does not
include the Chinese glyphs.

I wonder whether it would be possible to use the same sort of logic
used in the Java API, and also Mozilla, to look in another font for
the missing glyphs - or maybe this is something that the system should
be handling?

A further test show that if you don't set the file encoding used by
Eclipse to UTF-8, while setting that of the client process, you get
the following (mangled data):

    123-g5Ξ㈯冓

Also, you must set the file encoding used by the child VM as a parameter
to the VM, doing a System.setProperty() is too late, since the
output stream has already been initialised.

Andre
[snip - see archives for the rest of the thread]




Back to the top