Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 72939 invoked from network); 21 May 2007 16:09:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2007 16:09:31 -0000 Received: (qmail 69346 invoked by uid 500); 21 May 2007 16:09:04 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 69314 invoked by uid 500); 21 May 2007 16:09:04 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 69294 invoked by uid 99); 21 May 2007 16:09:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 09:09:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [217.140.77.184] (HELO mail.schoenhaber.de) (217.140.77.184) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 09:08:55 -0700 Received: from localhost (unknown [127.0.0.1]) by mail.schoenhaber.de (Postfix) with ESMTP id 64BEB705DF9B for ; Mon, 21 May 2007 16:08:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at schoenhaber.de Received: from mail.schoenhaber.de ([127.0.0.1]) by localhost (mail.schoenhaber.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tKdluvu0gJxQ for ; Mon, 21 May 2007 18:08:31 +0200 (CEST) Received: from [192.168.42.6] (Gimli [192.168.42.6]) by mail.schoenhaber.de (Postfix) with ESMTP id 2B99C705DE83 for ; Mon, 21 May 2007 18:08:31 +0200 (CEST) Message-ID: <4651C3FE.4000604@schoenhaber.de> Date: Mon, 21 May 2007 18:08:30 +0200 From: =?UTF-8?B?TWFya3VzIFNjaMO2bmhhYmVy?= Reply-To: users@tomcat.apache.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.3) Gecko/20070519 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Encoding in Tomcat 6 References: <4651B1D8.90800@dfki.uni-kl.de> In-Reply-To: <4651B1D8.90800@dfki.uni-kl.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org hkml@dfki.uni-kl.de wrote: > Scenario: > An own servlet (that is: a class derived from HttpServlet) is creating > very simple HTML output, containing (beside the necessary HTML tags > , etc.) just some German special characters (ä ö ü). > > The java source code is UTF-8, the response instance is configured via > response.setContentType( "text/html;charset=UTF-8" ); > Just for safety I also added > response.setCharacterEncoding( "UTF-8" ); > > The created HTML text contains a meta tag > > > Nevertheless: when calling the corresponding URL, all the special > characters are not displayed correctly in the browser (Firefox), when > using Tomcat 6. If I switch the encoding of the displayed page to > ISO-8859-1 in Firefox the characters are displayed correctly. That is: > it seems to me that everything is okay with the servlet, except that the > used encoding for the response is ISO-8859-1 instead of UTF-8. Works fine for me. You do call response#setContentType before response#getWriter, don't you? There's no filter changing things? BTW: I consider LiveHTTPHeaders an incredibly useful Firefox extension when it comes to finding out which headers the server really sends. Regards mks --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org