java - Can't see Sinhala Unicode characters in NetBeans -


i tried print sinhala characters in netbeans 7.1 java application.(in windows 7) other languages chinese , urdu .. etc show correct character. sinhala characters not displaying correctly. it display little boxes both in code , output. though here in show "සිංහල" . how can fix ?

i can without problem in eclipse environment.

    string = "世界你好";     system.out.println(a);     system.out.println("कई");      // sinhala     char c = '\u0d85';     system.out.println(c);     system.out.println("\u0d85");     system.out.println("සිංහල");      system.out.println(java.nio.charset.charset.defaultcharset().name()); 

i tried changing sources -> encoding type utf-8. , netbeans.conf file changed netbeans_default_options , added -j-dfile.encoding=utf-8 below

netbeans_default_options="-j-dfile.encoding=utf-8 -j-dorg.netbeans.modules.tomcat.autoregister.token=1378930362898 -j-dorg.netbeans.modules.tomcat.autoregister.catalinahome=\"c:\program files\apache software foundation\apache tomcat 6.0.20\" -j-dorg.glassfish.v3ee6.installroot=\"c:\program files\sges-v3\" -j-client -j-xss2m -j-xms32m -j-xx:permsize=32m -j-dapple.laf.usescreenmenubar=true -j-dapple.awt.graphics.usequartz=true -j-dsun.java2d.noddraw=true -j-dsun.zip.disablememorymapping=true" 

how can fix this. ?

the default monospaced font in netbeans not sufficient unicode characters. try using unicode font supports sinhala. windows 8 comes iskoola pota , nirmala ui can display sinhala nicely. don't know if can find these 2 fonts on windows 7, can download gnu freefont (only freeserif has sinhala) alternative iskoola pota or nirmala ui.

to see sinhala characters in editor display, select netbeans menu: tools => options ==> fonts & colors => syntax tab => category default => font , set either iskoola pota or nirmala ui or freeserif.

likewise, see sinhala characters in output display, select netbeans menu: tools ==> options ==> miscellaneous ==> output tab ==> font , set either iskoola pota or nirmala ui or freeserif. can right click on output display , choose settings... go there directly.

this code , output in netbeans 8.0.2 on windows 8 freeserif font.

enter image description here

more reading on sinhala fonts: unicode font , list of typefaces included microsoft windows


Comments

Popular posts from this blog

c# - must be a non-abstract type with a public parameterless constructor in redis -

c# - ReportViewer control - axd url -

time series - R growth rate calculation week over week on daily timeseries data -