This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes UTF8 issue on solaris Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "UTF8 issue on solaris" Watch "UTF8 issue on solaris" New topic
Author

UTF8 issue on solaris

r kadam
Greenhorn

Joined: Mar 12, 2003
Posts: 3
I am unable to retrieve form POST data in utf-8 and display it back in Browser Client. I have added this line in the HTML form:
<meta http-equiv="content-type" content="text/html; charset=utf-8">

In Servlet Code, I have specified the encoding:
// Retrieve the parameter data from Request
req.setCharacterEncoding("UTF8");
byte[] paramValue= req.getParameter("firstName").getBytes("UTF8");
String paramString = new String(paramValue);

This servlet works fine on my windows 2000 & weblogic8.1. But the same servlet sends back the actual input character On Solaris.

I have set following on solaris:
environment variable: LC_ALL=en_US.UTF-8
JVM argument : -Dfile.encoding=UTF-8

Thanks in advance.
 
Consider Paul's rocket mass heater.
 
subject: UTF8 issue on solaris