Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 50664 invoked from network); 6 May 2000 06:08:44 -0000 Received: from sv01.geocities.co.jp (210.153.89.155) by locus.apache.org with SMTP; 6 May 2000 06:08:44 -0000 Received: from mail.geocities.co.jp (mail.geocities.co.jp [210.153.89.137]) by sv01.geocities.co.jp (8.9.3+3.2W/3.7W) with ESMTP id PAA09664 for ; Sat, 6 May 2000 15:08:39 +0900 (JST) Received: from arimoto (1Cust181.tnt1.kobe.jp.da.uu.net [63.12.180.181]) by mail.geocities.co.jp (1.3G-GeocitiesJ-3.3) with ESMTP id PAA27447 for ; Sat, 6 May 2000 15:08:38 +0900 (JST) Message-ID: <001201bfb721$562ce5d0$0300000a@osaka.japan.ibm.com> From: "Hirofumi Arimoto" To: Subject: encoding bug Date: Sat, 6 May 2000 15:07:18 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hi, all. I found a bug relating to an encoding. I'm now using tomcat v3.1 , which can't send cookies including japanese characters. Its root cause is the method org.apache.tomcat.service.http.HttpResponseAdapter#endHeaders. In this method, the content of headers is forcely encoded as "8859_1". So please change to take care of an encoding correctlly when write headers. I have now seen the CVS repository, but it seems that this bug have been not fixed yet. Here is a fix: ---- before: sout.write( headersSB.toString().getBytes(Constants.CharacterEncoding.Defaul t) ); ---- after: String encoding = getCharacterEncoding(); if(encoding == null) out.write( headersSB.toString().getBytes(Constants.CharacterEncoding.Default ) ); else try { sout.write( headersSB.toString().getBytes(encoding) ); }catch(java.io.UnsupportedEncodingException ex) { out.write( headersSB.toString().getBytes(Constants.CharacterEncoding.Default ) ); System.out.println("Unsuported encoding: " + encoding ); } ---- i hope you understand my english :-) happy hacking! --- << Hirofumi Arimoto. Kobe,Japan. >> Internet Mail : arimot@geocities.co.jp Yahoo Pager Japan : arimoto AOL IM Japan : arimot ICQ : 6795777 ---