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 163296

Summary: i18n - cannot input mbytes to editor
Product: editor Reporter: mvanek <mvanek>
Component: -- Other --Assignee: issues@editor <issues>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: jf4jbug, mmirilovic, t_h
Priority: P2 Keywords: I18N
Version: 6.x   
Hardware: All   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: ubuntu mbytes
messages log
squares in output console

Description mvanek 2009-04-21 17:58:17 UTC
I run NB6.7  beta  in japanese locale. 

If I run NB with japanese pseudo locale files, label, tooltips contain both
multibyte prefixes, suffixes and are correctly dispalyed.
In editor, there are only squares instead of mbytes. See in attachment. 
It is not possible to input multi bytes there.
If I copy these squares and put them to any text file, suddenly I can
see correct Mbytes.

Product Version: NetBeans IDE 6.7 Beta (Build 200904192254)
Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15
System:Linux version 2.6.24-22-generic running on i386 UTF-8; ja_JP (nb)

Similar behaviour is happening with chinese locale too
On opensolaris with the same configuration NB works fine.
Comment 1 mvanek 2009-04-21 17:58:59 UTC
Created attachment 80619 [details]
ubuntu mbytes
Comment 2 Jiri Prox 2009-04-22 08:35:46 UTC
Can you please try setting bigger font in editor? maybe there are missing fonts for specific locale and font-size
Comment 3 Vitezslav Stejskal 2009-04-22 09:24:30 UTC
Could you please run the IDE with -J-Dorg.netbeans.api.queries.level=0 and -J-Dnetbeans.debug.editor.document=true
switches, do the same test and attach the IDE's log file. What is the source encoding in the project where the file
belongs? Also could you simply load the file in gedit and java notepad (ie. run java -jar
$JAVA_HOME/demo/jfc/Notepad/Notepad.jar)? Thanks
Comment 4 mvanek 2009-04-22 11:00:48 UTC
to Vstejskal:
I ran NB with those switches, please find result in attached log file. The result is still the same. Squares instead of
mbytes. 
Project encoding is UTF-8. I also tried windows EUC-JP with the same result. Masaki Katai advised me this workaround -
http://wiki.netbeans.org/FaqI18nLinuxAsianFonts, I will inform you about the result. 
If I view java file by gedit, all mbytes are displayed correctly. If I try this by java Notepad, there are squares. 
This happens with this java version "1.6.0_13".
If I run Notepad with this java, java version "1.6.0_0", mbytes are visible, but appears an incorrect displaying of labels. 
Comment 5 mvanek 2009-04-22 11:03:16 UTC
Created attachment 80673 [details]
messages log
Comment 6 mvanek 2009-04-22 13:37:51 UTC
Netbeans by default uses Monospace font type. I did this workaround(http://wiki.netbeans.org/FaqI18nLinuxAsianFonts)
with manually installing other Japanese ttf. Now it is possible to see mbytes in editor. If I do
system.out.println("some mbytes") in output console there are squares again. see attached image. 
Comment 7 mvanek 2009-04-22 13:38:54 UTC
Created attachment 80694 [details]
squares in output console
Comment 8 t_h 2009-04-22 16:52:13 UTC
Is it the same if you switch to different font via OW context menu?
Comment 9 mvanek 2009-04-22 17:02:21 UTC
What is OW context menu? thanks
Comment 10 t_h 2009-04-22 17:18:57 UTC
Output Window context menu (right click on content of Output Window, select Choose Font)
Comment 11 mvanek 2009-04-23 09:06:06 UTC
After switching font in context window it is working correctly.
Comment 12 David Strupl 2009-04-23 15:32:48 UTC
What is the status of this issue? Can we close it? Anything we can do on NB side?
Comment 13 Masaki Katakai 2009-04-24 07:46:25 UTC
I sent additional instruction to Michal. Probably my first instruction
was not correct, we need to prepare monospace Japanese fonts too.

Michal, could you check?

On my Japanese Ubuntu environment, I'm seeing these characters properly.
Comment 14 mvanek 2009-04-24 08:51:44 UTC
Masaki, I can confirm it works after font change.
We can close this bug.
Comment 15 mvanek 2009-04-24 09:19:38 UTC
closing as works for me. thanks guys