This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 146413 - I18N - Chinese words can't display correctly
Summary: I18N - Chinese words can't display correctly
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-09-06 18:11 UTC by yinghan
Modified: 2008-09-08 14:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
jsp file hava Chinese words (462 bytes, text/plain)
2008-09-07 01:26 UTC, yinghan
Details
the snapshot of the file with Chinese words in editor (148.42 KB, image/png)
2008-09-07 08:40 UTC, yinghan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yinghan 2008-09-06 18:11:12 UTC
I'm use netbeans6.1 in ubuntu8, i find the Chinese words can't display correctly, I try to change the encoding of the
file, but i doesn't work
Comment 1 Petr Dvorak 2008-09-06 21:17:25 UTC
Hi!

It is difficult to tell what is wrong if we have only the brief description of the problem you gave us.

Can you please send us more information, at least following:

1. Information from Help>About in Netbeans (so that we know NB build, JDK version and OS)
2. "messages.log" file - can be found in ~/.netbeans/6.1/var/log folder (to see your encoding + other log info)
3. Example of a file that does not display correctly in NB and some correct version of the file (created in some editor
where it works as expected) so that we know what is expected result and what is an actual result

I am adding Ken Frank on CC list.
Comment 2 Ken Frank 2008-09-07 00:54:14 UTC
to issue filer, please also attach an image of the incorrect
Chinese characters in editor, as well as how they look
correctly perhaps in some other editor.

some other questions that can help us:

what is the editor font being used - is it a font that can display Chinese characters - 
see the editor font choices in tools->options and change to some others to see if its
just a font choice situation,


if not, then: also, please tell:

what project type is being used - ie java project, web project ?

what file type is it ? ie java, html, jsp , etc 

what is the encoding property of the project - click on the 
project name in file explorer and choose properties then
look towards bottom of it at the encoding property.

also, are the characters entered in editor from an imported
file from somewhere else or newly entered into editor directly ?

what locale did you log into ubuntu in ? Is it a chinese locale, and one
where the characters you are using in netbeans are valid for that locale
(ie they display ok in other terminals or editors) ?

finally, if project encoding is utf-8 - create a new project, change its encoding
to the default encoding of the locale you are running in, then
create another new project after that, and do the same steps -- do the characters still
not display correctly ?

ken.frank@sun.com
Comment 3 yinghan 2008-09-07 01:26:01 UTC
Created attachment 69238 [details]
jsp file hava Chinese words
Comment 4 Ken Frank 2008-09-07 01:38:27 UTC
thanks for the attachment but we really need things as how they
look in netbeans editor itself via a snapshot
and also answer to the other questions asked below.

ken.frank@sun.com
Comment 5 yinghan 2008-09-07 08:40:03 UTC
Created attachment 69244 [details]
the snapshot of the file with Chinese words in editor
Comment 6 yinghan 2008-09-07 08:50:04 UTC
I can see the Chinese words correctly now,i just so as kfrank said:"Change the Font of the eidtor",thanks,thanks everyone!
Comment 7 Ken Frank 2008-09-07 15:57:29 UTC
To dev team, is the editor default font at startup a certain standard jdk font name ?
if so, then I think it normally maps to appropriate actual font, at least
for fonts defined in jdk for some locales like ja and zh, and in most cases
that does seem to work.

perhaps for this situation some os fonts assumed by jdk for that platform were not installed.

in some cases, it can be the jdk from java.sun.com since for ubuntu it does not have the font mappings
needed; in nb faq we point users to jdk from ubuntu itself to use that does have the mappings.

yinghan,

does the Chinese characters in other parts of netbeans
show ok ?

and what jdk are you using - do java -version to see.

ken.frank@sun.com
Comment 8 Vitezslav Stejskal 2008-09-08 11:44:58 UTC
> To dev team, is the editor default font at startup a certain standard jdk font name ?

We only specify StyleConstants.FontFamily -> 'Monospaced'.
Comment 9 Ken Frank 2008-09-08 14:54:45 UTC
since we specify monospaced, which seems like the right thing to do, then it might be the jdk font mapping 
for monospaced is not defined for a font installed on the os
or it might be that the recommended jdk for ubuntu is not installed
or it might be that some needed fonts are not installed - in any case
it works now by setting editor font options.

ken.frank@sun.com