Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

arabic encoding problem with jsp

 
hesham katon
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ehab Shehata
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic