Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Arabic Text Rendering Issue

  Asked By: Everett    Date: Sep 21    Category: Java    Views: 1431
  

I have a issue regarding to display arabic characters in my results jsp page.It displays my arabic characters as ??? ????? ??? .
In my jsp i used windows-1256 as the char set and the relates servelt code as mentoned in below.I need to display the arabic charactes in my jsp .Pls help me
This is the my servelt cocd snippet
String thekey9="مبلغ Ù…Ø Ø¬ÙˆØ²";
String s9 = new String(thekey9.getBytes("ISO-8859-1"),"windows-1256");
logger.debug("thekey9 value is " + s9);
httpSession.setAttribute("test9",s9);
In JSP

<meta http-equiv="Content-Type" content="text/html; charset=windows-1256"/>
<%
String s9 = (String)session.getAttribute("test9");
out.println("*****getting session attributes test9 is ******* "+s9); This returns the out put as "??? ??????? ???"
%>

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Gerald Cruz     Answered On: Sep 21

You should set  JSP page  encoding on first line.
It is better yo use property files to store i18n strings.

 
Answer #2    Answered By: Zoar Mizrachi     Answered On: Sep 21

thare are 3 encoding in jsp
1- pageEncoding
2- request encoding
3- response Encoding (not ur case)
i cant tell definitifly , what is ur problem.

 
Didn't find what you were looking for? Find more on Arabic Text Rendering Issue Or get search suggestion and latest updates.




Tagged: