This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
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

Java Internationalization Issue for Arabic

 
Adnan Badar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am getting problems while displaying arabic data on browser. I am using java Internationalization API and using properties file. When I change browser encoding to UTF-8 arabic displays fine else I get:

���������� ��

* I tried to use in my jsp following:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>

and also:
request.setCharacterEncoding("UTF8");

I tried combination of all but not working properly. If i fetch arabic data from Oracle database it displays fine using:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Please help me is there any issue while reading arabic data from properties file using java i18n solution.

Thanks in advance.
 
Tyler Zetaf
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You specified UTF8 as the character encoding in the call to setCharacterEncoding ("UTF8") should be "UTF-8".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic