Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sinhala Unicode rendering issues in Java Swing

When I use Sinhala Unicode word "ප්‍රවාහන" in JLabel it renders as "ප්රවාහන".

I think is problem in ZWJ character. Any ideas how to fix it?

I'm using Java 7 in Windows 8.1 (64 bit).

like image 940
user2473015 Avatar asked Nov 10 '22 00:11

user2473015


1 Answers

There is a ZERO WIDTH JOINER (U+200D) in the first string. Try removing them:

new JLabel(s.replace("\u200D", ""));
like image 57
Joop Eggen Avatar answered Nov 15 '22 12:11

Joop Eggen