tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takashi Okamoto" <tokam...@rd.nttdata.co.jp>
Subject Character encoding patch for getParameter
Date Tue, 01 Aug 2000 11:09:15 GMT
Hello.

I made a patch for probrem with tomcat.

Now ,if we don't use 'en' locale ,we (don't use english people) must
decode character encoding.
For exapmle(encoding is EUC_JP,but other encoding is OK.):

----------------

response.setContentType("text/html;charset=EUC_JP");
String str = request.getParameter("PARAM_NAME");
String decode_str = null;
if(str!=null){
  decode_str = new String(str.getBytes("8859_1") ,"EUC_JP");
  str=decode_str;
}

----------------

But IBM 'WebSphere' (maybe 3.0) and Caucho 'Resin' don't have this problem.
They decode character encodings automatically.
and we write only:

----------------

response.setContentType("text/html;charset=EUC_JP");
String str = request.getParameter("PARAM_NAME");

----------------

So ,if we use this pache ,we are grad that we don't need decode 
character encodings manually.

This patch is for Tomcat3.2 beta2.

Please do 

% cd jakarta-tomcat/src/org/apache/core
% patch -p1 < RequestImpl.patch

and recompile tomcat.


Could you apply this patch on next tomcat release?
----------
NTTDATA Corporation, R&D Headquarters
Takashi Okamoto (mailto:tokamoto@rd.nttdata.co.jp)



Mime
View raw message