File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSP
Bookmark "arabic encoding problem with jsp" Watch "arabic encoding problem with jsp" New topic

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 :

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

Joined: Jan 20, 2009
Posts: 1
you need also to use:
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:
I agree. Here's the link:
subject: arabic encoding problem with jsp
It's not a secret anymore!