by admin

Iskoola Pota Sinhala Unicode

Now it is possible to type in Sinhala and Tamil, exchange information in Sinhala and Tamil using computers and browse the web in Sinhala and Tamil. New avenues are now open in the use of ICT for most people in Sri Lanka.

I tried to print Sinhala characters in NetBeans 7.1 Java application.(In windows 7)Other languages like Chinese and Urdu . etc will show the correct character. But Sinhala characters are not displaying correctly. It will display as little boxes both in the code and the output. though here in SO it show as 'සිංහල' . How can I fix it ?

I can do this without a problem in eclipse environment.

I tried changing the Sources -> Encoding type to UTF-8.and now my netbeans.conf file I changed netbeans_default_options and added -J-Dfile.encoding=UTF-8 like below

How can I fix this. ?

primeprime

1 Answer

The default monospaced font in Netbeans is not sufficient for unicode characters. Try using a unicode font that supports Sinhala. Windows 8 comes with Iskoola Pota and Nirmala UI which can display Sinhala nicely. I don't know if you can find these two fonts on Windows 7, but you can download GNU FreeFont (onlyFreeSerif has Sinhala) as an alternative to Iskoola Pota or Nirmala UI.

To see Sinhala characters in the editor display, select Netbeans menu: Tools => Options > Fonts & Colors => Syntax Tab => Category Default => Font and set it to either Iskoola Pota or Nirmala UI or FreeSerif.

Likewise, to see Sinhala characters in the output display, select Netbeans menu: Tools > Options > Miscellaneous > Output tab > Font and set it to either Iskoola Pota or Nirmala UI or FreeSerif. You can right click on the output display and choose Settings.. to go there directly.

Jo bheji thi dua. This is your code and output in Netbeans 8.0.2 on Windows 8 with FreeSerif font.

More reading on Sinhala fonts: Unicode Font and List of typefaces included with Microsoft Windows

leo4jcleo4jc

Not the answer you're looking for? Browse other questions tagged javanetbeansunicodeutf-8 or ask your own question.