This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes how can i choose the right encoding to read arabic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how can i choose the right encoding to read arabic " Watch "how can i choose the right encoding to read arabic " New topic
Author

how can i choose the right encoding to read arabic

gaser hasan
Greenhorn

Joined: Aug 03, 2010
Posts: 9
Please I have a problem in the page encoding where it cant read arabic rightly:
- my webpages are jsp and i tried the encoding directive

- and the meta tague header


but it shows me the data selected from the database encrypted ( محاورات)
- when i removed the java directive it needed to select the utf-8 encoding manually from the browser to be read
so can any one please tell me how can i solve this problem and choose the right way to palce encoding ?
by the way i set the chareset for the database utf-8


thanks in advance

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Try this instead :


[My Blog]
All roads lead to JavaRanch
gaser hasan
Greenhorn

Joined: Aug 03, 2010
Posts: 9
thanks Christophe Verré for reply but i tried it before and now but it didn't solve the matter

but you know that if i removed the directive completely and kept the meta tage header it shows me the language encrypted but when selecting utf-8manually
it shows the language ok so my i know if there is some thing that select the chareset utf-8 automatically ?


thanks in advance
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

In your servlet, did you use the setCharacterEncoding and setContentType methods on the response ?
 
 
subject: how can i choose the right encoding to read arabic
 
Similar Threads
arabic data from the database
Mail Content problem for Arabic & Hebrew language
Unicode convert problem with Jboss in Linux
Java Internationalization Issue for Arabic
parsing xml(utf-8): characs not displayed in html