简体   繁体   中英

Printing Unicode characters in java

I'm developing a Sinhala-English Unicode translator on Java. When I print a Unicode character in a JTextPane, it only shows a blank box. But when I copy that box to the notepad in windows it shows me the letter. The problem is that Java not showing the Unicode characters instead windows.

How can I fix this problem?

It's likely that the font you are using in your JTextPane does not fully support the Unicode range that you are trying to display. Try setting the text area's font to something more Unicode-friendly (see the row labeled "Sinhala (80: 0D80–0DFF)").

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM