hi
i have a project and i have database that is written in arabic language when i run my program all iget is small square instead of the arabic character and i have try to solve this problem 3 months ago and i have search the web and i didnot get an answer for any advise i 'll be thankful?

You need to use the unicode value for every arabic character to print the arabic characters....

check this out...

http://unicode.org/charts/PDF/U0600.pdf

You could do that manually... or you can use many online arabic to unicode convertors found online...

like this one..

http://www.arabunic.free.fr/

I donot know arabic... and Im giving you the technique used to print unicode code points in java...

eg.

If a certain arabic character has the unicode value of "0635", then if you want that character in a certain String then u need to use

String txt="\u0635"

thank you for your help it was really useful can you please explain a little more about the second way

hi i try to print uni code but when i run the program all i get is ? here is the code

System.out.println("\u0627");

I dont think the console can print this. Try using it in a GUI application.

i try to print it in jtextfield but all i get is small square

Well it works perfectly for me... Could u post the code?

I dont think the console can print this. Try using it in a GUI application.

would depend on the console, but most indeed support only 7 bit ASCII

here is the code for text field

jTextField1.setText("\u0641");

but all i get small square i want to thank all of you for helping me

Ok. I think the font cant display that glyph.

Try this and tell me whether you get true or false.

jTextField1.getFont().canDisplay('\u0641');
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.