I'm creating a mobile app using LWUIT.
I used HTMLComponent to show help text to user. Note that the help language is Farsi (which uses Arabic letters).
On most handsets it works fine but on others (e.g. Samsung B3410W) it just shows questions marks instead of letters.
I've set HTMLCallback
but parsingError
is not called at all.
The instruction which sets the html code is this:
helpComponent.setHTML("<html dir=\"rtl\"><body><p align=\"justify\">" + body + "</p></body></html>", "UTF8", null, true);
where body
is a string read by calling DataInputStream.readUTF()
method.
Does any body know what I'm missing?
P.S. other parts of application(Lables, Forms, etc) has no major problems with arabic letters. It's just HTMLComponent which is problematic.
Thank you
I changed "UTF8" for encoding to "UTF-8" and now the problematic handset is working fine. It seems (at least some) samsung models use "UTF-8" as the name of that encoding.
But I'm worried that some other mobile handsets may have problem with "UTF-8" and accept "UTF8".
Is there any thing that I can do to make it working on all phones?
It's probably the same problem: Why arabic font not supported in Samsung mobiles using LWUIT?