jQuery in Action, 2nd edition*
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
 
subject: UTF8 issue on solaris
 
Similar Threads
Problem converting form data to UTF-8 on solaris
struts with character encoding problem
utf8 to unicode..from browser to oracle db
JSP Character Encoding
Decoding UTF-8 string in Servlet