tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: Real problem posting &Euro symbol from jsp page, using TC 5.0
Date Mon, 06 Sep 2004 11:12:52 GMT
Hi Ben,

OK, here is my setup. Can you do the same for yours considering the various layers I have
drawn below. You did not mention in your post if you are using the request filter servlet
to ensure request encoding is set to utf-8. Remember, Tomcat defaults to ISO-8859-1 for inbound
requests. I am not sure if it pays attention to the form accept encoding, so be sure to use
the filter. Someone else may have a better way or confirm whether form accept-encoding works
on forms. I suppose you could test this in your Servlet by printing request.getCharacterEncoding().
This needs to be UTF-8 if all is well. Can you confirm this?

==========================================================
Windows 2000
----------------------------------------------------------
       | JVM [file.encoding = utf-8]
       ---------------------------------------------------
       | TOMCAT
----------------------------------------------------------
DB     | DB URL CHARSET | SERVLET | SERVLET FILTER | JSP
----------------------------------------------------------
Cp1252 | Cp1252         |    -    | set req. utf-8 | utf-8
==========================================================



> -----Original Message-----
> From: Ben Bookey [mailto:ben.bookey@gistec-online.de]
> Sent: 06 September 2004 11:19
> To: Tomcat User List
> Cc: Allistair Crossley; Nikola.Milutinovic@ev.co.yu
> Subject: Real problem posting &Euro symbol from jsp page, using TC 5.0
> 
> 
> 
> Dear TC profis, (allistair and Nikola)
> 
> I have had this problem for a week (aaahhh!), and would 
> really appreciate
> ANY help or pointers to what I may be doing wrong.
> 
> When I post a EUR value from a form from either Netscape 6.0 or 
> IE 6.0, and do
> a system.out.println in my test
> servlet there is always something other than the Euro symbol 
> arriving in my
> test servlet.  Most often is a ? which indicates the browser-client
> is posting using ISO8859-1
> 
> Please take a look at the simple jsp pages below, which is 
> using UTF-8. ( in
> another test I have also changed all the various
> encoding parameters to ISO8859-15, but there is still no Euro 
> symbol on the
> server).!
> 
> PLEASE......................................... WHAT AM I 
> DOING WRONG ??
> 
> :-(
> 
> Ben
> 
> '=============================================================
> ==============
> ======================================================
> <%@ page language="java"%>
> <%@ page contentType="text/html;charset=utf-8"%>
> <%@ page pageEncoding="utf-8"%>
> <html>
> <head>
>      <META NAME="GENERATOR" CONTENT="test page for encoding"
> http-equiv="Content-Type" content="text/html" charset='utf-8'>
>      <title>encoding data test.</title>
> </head>
> 
> <body  bgcolor="#F3F3F3">
> <br><br><br>
> <%
> String reqURL = 
> "/InGeoWebEntryTool/servlet/EncodingValidationServlet";
> String strEncodeTest="";
> %>
> <FORM action="<%=reqURL%>" ACCEPTCHARSET='utf-8' method="post">
>  <input  type="text" name="encodeTest" 
> value="<%=strEncodeTest%>" size="98">
>  <input type="submit" value="update" style="WIDTH: 120px">
> </FORM>
> </body>
> </html>
> 
> '=============================================================
> ==============
> ===================================================
> Here are some system properties from my server.
> 
> file.encoding = Cp1252
> java.specification.version = 1.4
> catalina.home = D:\Program Files\NetBeans3.6\jakarta-tomcat-5.0.19
> java.version = 1.4.2
> sun.cpu.endian = little
> sun.io.unicode.encoding = UnicodeLittle
> 
> '=============================================================
> ==============
> ===================================================
> 
> 


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message