aspose file tools*
The moose likes JSP and the fly likes arabic encoding problem with jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "arabic encoding problem with jsp" Watch "arabic encoding problem with jsp" New topic
Author

arabic encoding problem with jsp

hesham katon
Ranch Hand

Joined: Dec 18, 2002
Posts: 82
Dear All,
I read many messages about the same problem .
but I didn't find out the soloution yet .

in breif :
- I use this code at the top of all jsp pages :
<%@ page contentType="text/html; charset=windows-1256" %>

- when i write arabic text in simple jsp file , it's fine

- when i try to retrieve any data from mysql database , i get question marks (???)

example :
http://www.saidalany.com/1.jsp

as you can see : the plain arabic text at the top is ok
but the rest of data retrieved from db is just question marks

I tried lot of things , but nothing works .

I wish anyone can help me

Thanks in advance


Hesham Katon<br />SCJP 1.2<br />SCWCD 1.4<br />Better to light a candle than to curse the darkness
Ehab Shehata
Greenhorn

Joined: Jan 20, 2009
Posts: 1
you need also to use:
request.setCharacterEncoding("windows-1256");
in the place you wanna get the parameters (either jsp or servlet).
Here you got all parameters correctly in arabic.
And everything goes well.
Now ensure that the data base encoding is correct and it does accepts arabic and
displays it from withen its manipilation tools (ex. SQLPlus for Oracle).
Refer to me if you still have problems onthe following mail:
eshehata2007@yahoo.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: arabic encoding problem with jsp