tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Switching on UTF-8 Encoding
Date Thu, 07 Feb 2002 14:59:53 GMT

 You can use <%@ page contentType="text/html;charset=UTF-8" %> in the JSP or
alternatively include the <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=UTF-8"> tag in your HTML.  This will tell the browser to use the UTF-8

Then when getting the requests, you can do a request.setCharacterEncoding
("UTF-8") before getting anything from the request to allow you to read in
parameters as UTF-8.  You could also try just reading in the parameters
without setting that, and then doing param.getBytes("UTF-8").

I've been struggling with some encoding issues for a little while now, but I
have it working, so if you have any other questions, please feel free to email
me and I'll see if I can help.

Good luck,

                    Antony Stace                                                         
                    <s45652001@ya        To:       
          >             cc:                                          
                                         Subject:     Switching on UTF-8 Encoding        
                    07:45 AM                                                             
                    respond to                                                           
                    "Tomcat Users                                                        


What do I need to do so that data returned from Tomcat 4 is returned in UTF-8
encoding to a requesting browser and
requests received are read as UTF-8.




Do You Yahoo!?
Get your free address at

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message