behofmann
behofmann

Reputation: 49

NetBeans 15 Hindi Character Display Issue

I upgraded NetBeans from Version 11 to 15. Version 15 is not displaying Hindi characters.

enter image description here

But Version 15 displays other language characters:

enter image description here

Under options, I have the same Fonts & Colors settings defined as Version 11.

enter image description here

Does anyone know how to fix this problem?

Thanks,

Brandon

Upvotes: 1

Views: 507

Answers (1)

skomisa
skomisa

Reputation: 17353

If you set the font for the NetBeans Edit window to Unifont using Tools > Options > Fonts & Colors > Font then it will render Latin, Japanese and Hindi characters. You don't specify the language(s) you are using, but here is a trivial sample application in Java:

package pkg;

public class HindiJapanese {

    public static void main(String[] args) { // Edit window uses Unifont font.
        System.out.println("Hello World!");        
        System.out.println("Hello world in Hindi:    नमस्ते दुनिया");
        System.out.println("Hello world in Japanese: こんにちは世界");
    }
    
}

You will also need to set the font for the Output window to Unifont using Tools > Options > Miscellaneous > Output > Font before running that code:

Screen shot

Update: Everything still works when using JDK 19 and Arial Unicode MS font, although that font is not fixed width:

Using Arial Unicode MS with JDK 19

Notes:

  • My environment is a NetBeans 15 Java Ant project on Windows 10 using JDK 11.0.12, though the edit window font setting is language independent.
  • In Control Panel the checkbox for Beta: Use Unicode UTF-8 for worldwide language support (Region > Administrative > Change system locale....) was not checked.
  • Unifont is an impressive font. It is bundled with NetBeans, it can render all characters in the BMP, and was the only fixed width font I could find to render Latin, Japanese and Hindi text. Though not great visually, it seems acceptable for software development requiring different character sets from multiple languages.
  • I can't vouch for the quality of the rendering of the Japanese and Hindi glyphs. See the Status section of this article for more information on Unifont, and some cautions on its limitations.
  • While not directly related to your question, you might consider moving that language specific data out of your source code and into resource files if possible.

Upvotes: 1

Related Questions