> I got a problem. I'm building a site supporting multi langages.
> So I chose UTF8 for encoding, That is, the page's content
> type is set for UTF8. But user may type in native code such
> as SJIS when they submit search key words. when I get the
Test this example:
public String getUtfPar(String strWebForm) throws IOException
{
if (strWebForm!=null)
return new String (strWebForm.getBytes("iso8859-1"),"utf-8");
else
return null;
}
response.setContextType("text/html;charset=utf-8");
String myInputText = getUtfPar(request.getParameter("someFormText"));
...
Leos
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html