Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Zero Width Joiner is removed in Labels and TextFields
My Vaadin web application is translated to Nepali and we have a problem: the special characters ZWJ and ZWNJ are removed by Vaadin. It only happens in Labels and TextFields, not in MenuItems.
The characters are:
ZWNJ (zero width non joiner): U+8204 or ÈC;
ZWJ (zero width joiner): U+8205 or ÈD;
In the attachment you can see them in action. The top one is a menu item where the characters are displayed correctly (they control the combinations of two letters).
The middle one is a label where the characters get removed (they appear as 200C and 200D).
The bottom one is a text field where the characters get even worse.
This is the test code (I hope the characters work in this very text area):
String textWithZwnj = "छुट्याउनेछन् क्ष क्ष क्ष"; MenuBar menubar = new MenuBar(); l.addComponent(menubar); MenuItem item = menubar.addItem(textWithZwnj, null); Label label = new Label(textWithZwnj); l.addComponent(label); TextField f = new TextField("Textfield", textWithZwnj); l.addComponent(f);
Is there a setting to change this behaviour or is it a Vaadin bug?
Looks to me it's either a problem with the browser or with Vaadin (or its underlying GWT rendering engine).
did you try this across a number of web browsers? What browser did you test it with and on what operating system?
I contacted Vaadin and they confirmed that it looks like it's a Vaadin bug. They opened a ticket in the bug tracker.