wood burning stoves
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "UTF8 issue on solaris" Watch "UTF8 issue on solaris" New topic

UTF8 issue on solaris

r kadam

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
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: UTF8 issue on solaris
It's not a secret anymore!