Arabic Language Support

sorry for the inconvenience but I am having a problem with using Vaadin and arabic. when letting the UI captions in arabic, it is working fine, but when writing arabic in the TextFields e.g., on the screen everything is in arabic, but the application is dealing with them as “???” I first found that entering arabic data using the application is not working correct and when I tested and printed what is read from the application, i found that the application itself is not working with arabic!!

I am using eclipse and I changed the project’s file encoding from Cp1252 to UTF-8 but still nothing is working.

NB: Retrieving arabic data from the database is working well after using getBytes() as follow

              String result=new String(resultSet.getObject(j).toString().getBytes(),"windows-1256");

Can you help me please??

Thanks in advance

For me, reading Arabic from a text field and then echoing it back works just fine e.g. in the Sampler application.

Vaadin applications by default tell the browser to use UTF-8 for the application, and everything should work fine as long as all the text input from and printed to the Vaadin UI are using UTF-8. If you are displaying text in another character set on the UI, there is the possibility that some browsers might guess that you are not really using UTF-8, after which things can go wrong.

Make sure you convert the values to display to UTF-8 (if necessary), and convert them back to another character set (if necessary) e.g. when saving them to the database.

Also, I’m not sure if the Eclipse debugger displays text in UTF-8 correctly if your workspace encoding is not UTF-8.

Arabic should work just fine in text fields, you probably have an encoding problem somewhere in your application. See for example the
RTL workaround example

Well, the page doesn’t show the resource bundles in the example code, which goes like: … aww, this forum doesn’t accept arabic in the messages. But anyhow.