Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 98128 invoked from network); 10 Jun 2008 14:29:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jun 2008 14:29:40 -0000 Received: (qmail 20569 invoked by uid 500); 10 Jun 2008 14:29:32 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 20542 invoked by uid 500); 10 Jun 2008 14:29:32 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 20531 invoked by uid 99); 10 Jun 2008 14:29:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 07:29:32 -0700 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [203.200.218.100] (HELO mail.infotechsw.com) (203.200.218.100) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 14:28:43 +0000 Received: from mail.infotechsw.com (localhost [127.0.0.1]) by mail.infotechsw.com (8.13.1/8.13.1) with ESMTP id m5AEH1nt020501; Tue, 10 Jun 2008 19:47:02 +0530 Received: from ugendhar ([10.1.3.2]) by mail.infotechsw.com (8.13.1/8.13.1) with ESMTP id m5AEGtp7020121; Tue, 10 Jun 2008 19:47:01 +0530 Reply-To: From: "Raghuveer" To: "'Laurie Harper'" , Cc: "'Lukasz Lenart'" References: Subject: RE: Reading Application Resource saved as UTF8 file and showing polish characters in browser Date: Tue, 10 Jun 2008 19:57:21 +0530 Organization: IEL Message-ID: <00eb01c8cb06$1baacd80$67c013ac@pwit.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Thread-Index: AcjKtFFoFLK5bq0STJW0GIUmgmRDswAUXnHA X-TM-AS-Product-Ver: IMSS-7.0.0.3116-5.5.0.1026-15962.007 X-TM-AS-Result: No--7.990-5.0-31-1 X-imss-scan-details: No--7.990-5.0-31-1 X-TM-AS-User-Approved-Sender: No X-TM-AS-Result-Xfilter: Match text exemption rules:No X-Virus-Checked: Checked by ClamAV on apache.org Hi, Native2ascii has generated Unicode characters on polish windows system. But could not generate Unicode characters on Windows English Operating System. Thanks a lot to Lukasz and Laurie -----Original Message----- From: Laurie Harper [mailto:laurie@holoweb.net] Sent: Tuesday, June 10, 2008 2:24 AM To: user@struts.apache.org Subject: Re: Reading Application Resource saved as UTF8 file and showing polish characters in browser Lukasz Lenart wrote: > Hi, > > 2008/6/9 Raghuveer : > >> Is it possible in struts to configure the controller to read the >> application >> resource file which is saved as UTF8 format? >> > > You can use filter from Spring That wouldn't help, since it has nothing to do with resource file loading. > It is possible to save the notepad file in UTF8 instead of ANSII. > > If such notepad support UTF-8, you can use Notepad++ or JDK tool > native2ascii which will convert ANSII file to UTF-8, there is also ant task > available or many IDEs support such convertion in fly Unfortunately, it is not possible to *read* a resource file saved in this way. Application resource files are implemented under the covers using Java's PropertyResourceBundle which specifies [2] the file format as Latin-1 (ISO-8859-1) encoding with Unicode escapes. What you *can* do, however, is author the files in UTF-8 and then post-process them into the correct encoding during the build process, using any of the tools/techniques Lukasz suggests. L. [1] http://java.sun.com/j2se/1.5.0/docs/api/java/util/PropertyResourceBundle.htm l [2] http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org