aspose file tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply 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: 14672
    
  11

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: 14672
    
  11

In your servlet, did you use the setCharacterEncoding and setContentType methods on the response ?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how can i choose the right encoding to read arabic
 
Similar Threads
Java Internationalization Issue for Arabic
Unicode convert problem with Jboss in Linux
arabic data from the database
Mail Content problem for Arabic & Hebrew language
parsing xml(utf-8): characs not displayed in html