Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 42732 invoked from network); 10 Jun 2004 21:20:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Jun 2004 21:20:40 -0000 Received: (qmail 64982 invoked by uid 500); 10 Jun 2004 21:20:28 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 64883 invoked by uid 500); 10 Jun 2004 21:20:27 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 64861 invoked by uid 99); 10 Jun 2004 21:20:27 -0000 Received: from [64.73.39.52] (HELO madmail02.fiskars.com) (64.73.39.52) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 10 Jun 2004 14:20:27 -0700 Received: from madmail05.fiskars.com ([10.5.50.253]) by madmail02.fiskars.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 10 Jun 2004 16:19:59 -0500 Received: from [10.5.201.20] ([10.5.201.20]) by madmail05.fiskars.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 10 Jun 2004 16:19:59 -0500 Message-ID: <40C8D07F.7060801@fiskars.com> Date: Thu, 10 Jun 2004 16:19:59 -0500 From: "Ruth, Brice" User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Corrupted UTF-8 JSPs?! References: <000001c44f2d$be7de1e0$4f02a8c0@stbedm.silvacom.com> In-Reply-To: <000001c44f2d$be7de1e0$4f02a8c0@stbedm.silvacom.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Jun 2004 21:19:59.0103 (UTC) FILETIME=[AF48E0F0:01C44F30] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks, but I believe the problem is in the WAR packaging, somehow ... because I develop locally, deploy w/o packaging and it works fine - if I package it up again and re-deploy LOCALLY, then I get garbage ... native2ascii only works for properties files, as far as I've been able to determine. UTF-8 encoded JSPs have to have UTF-8 encoded characters, not the \u escaped characters that native2ascii creates. We only use native2ascii for our properties files Yansheng Lin wrote: >"developed locally, and then deployed remotely" > >Make sure on the remote system, the Java Runtime Environment supports UTF-8 >and is using it as the default encoding(export >JAVA_OPTS=-Dfile.encoding="utf8"). > >native2ascii UTF-8 encoded characters may help too. > >Yan > >-----Original Message----- >From: Ruth, Brice [mailto:bruth@fiskars.com] >Sent: June 10, 2004 14:00 >To: Tomcat Users List >Subject: Corrupted UTF-8 JSPs?! > > >I'm running into a strange issue. > >I have certain JSPs with UTF-8 encoded characters in them (polish >characters, to be exact). My Ant build.xml precompiles the JSPs using >Jasper and then packages the application into a WAR for deployment. > >When I develop locally with Tomcat 5.0.18, I deploy without packaging >into a WAR first. However, to deploy remotely, I create a WAR, then >deploy from that. > >Locally, the JSPs appear just as they should. After being packaged into >a WAR (even if I deploy it locally to the exact same instance of Tomcat >5.0.18), the UTF-8 characters are garbaged up. The garbaging appears the >same as it does when I override the page-provided UTF-8 encoding (in the >browser) and manually set the encoding to ISO-8859-1. > >What's going on here?! By the time that the JSPs are added to the WAR, >they're binary .class files, since they are precompiled! Text encodings >shouldn't make a bit of difference at that point, should they?!? > >The JSPs loaded still tell the browser that the encoding is UTF-8 ... >and UTF-8 characters in the .properties files (passed through >native2ascii) are properly displayed. > >It seems to me that something very strange is going on ... moreover, >this is going to really throw a wrench in our project if we can't get to >the bottom of it! > >Respectfully, >Brice Ruth > >--------------------------------------------------------------------- >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org