Nabin Bhandari Nabin Bhandari - 11 months ago 34
Java Question

Unicode Text not properly sent over network/displayed in JavaFX

I am working on socket programming now, and I want to send unicode characters over network. But the characters are not displayed properly.

The problem is that the charachers are displayed properly while running from IntelliJ IDEA IDE. But when I deploy JAR or run via command line, "???" is displayed instead of the unicode characters.

I am using Windows 10 64 bit.

Sample text: "गूड

Answer Source

Using "UTF-8" literally everywhere(streams, byte-string conversion, etc) did the job.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download