Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 79151 invoked from network); 26 Jul 2009 03:06:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jul 2009 03:06:40 -0000 Received: (qmail 30272 invoked by uid 500); 26 Jul 2009 03:07:42 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 30151 invoked by uid 500); 26 Jul 2009 03:07:42 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 30099 invoked by uid 99); 26 Jul 2009 03:07:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jul 2009 03:07:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jul 2009 03:07:38 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 48560234C051 for ; Sat, 25 Jul 2009 20:07:17 -0700 (PDT) Message-ID: <1833515009.1248577637295.JavaMail.jira@brutus> Date: Sat, 25 Jul 2009 20:07:17 -0700 (PDT) From: "Shawn Jiang (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Issue Comment Edited: (GERONIMO-4763) i18n properties files should be converted to ascii at build time. In-Reply-To: <1481831215.1248328274869.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-4763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735344#action_12735344 ] Shawn Jiang edited comment on GERONIMO-4763 at 7/25/09 8:06 PM: ---------------------------------------------------------------- {noformat} - everything is in ascii unicode escape sequences all the time (is this what we have now?) {noformat} yes, this is what we have. use \uXXXX ascii as the i18n resource storage format. {noformat} - everything is in utf-8 all the time (svn, checked out source code, any compiled property files {noformat} not exactly, we can make it because resource bundle only happy with \uXXXX escaped format. - utf-8 in svn and checkout and unicode escape after compilation {noformat} This is what I'm going to do. EOL of svn does not have any relationship with this i18n content encoding. I've tested Eclipse, notepad, gedit, vim. They are all happy with UTF-8 i18n properties. I think if the editor support utf-8, there's no reason it can't read UTF-8 i18n native language properties. As for the question why would we change to ascii during compilation? The problem is with resource bundles. For resouce bundle, Properties files are always read as ISO-8859-1. As a result, To include Unicode characters in i18n properties file, we must use \uXXXX escapes(with native2ascii tool). was (Author: genspring): {noformat} - everything is in ascii unicode escape sequences all the time (is this what we have now?) {noformat} yes {noformat} - everything is in utf-8 all the time (svn, checked out source code, any compiled property files {noformat} - utf-8 in svn and checkout and unicode escape after compilation The problem is with resource bundles. For resouce bundle, Properties files are always read as ISO-8859-1. As a result, To include Unicode characters in i18n properties file, we must use \uXXXX escapes(with native2ascii tool). > i18n properties files should be converted to ascii at build time. > ------------------------------------------------------------------ > > Key: GERONIMO-4763 > URL: https://issues.apache.org/jira/browse/GERONIMO-4763 > Project: Geronimo > Issue Type: Improvement > Security Level: public(Regular issues) > Components: usability > Affects Versions: 2.1.5, 2.2 > Reporter: Shawn Jiang > Assignee: Shawn Jiang > Priority: Minor > > Current i18n properties files are stored in source code repo after they are converted to ascii from native offline. It's very hard to contribute new translations. > We should keep native characters in source code while convert them to ascii at build time. maven plugin native2ascii-maven-plugin could be used here: > {code} > > org.codehaus.mojo > native2ascii-maven-plugin > 1.0-alpha-1 > > target/classes > src/main/resources > > > > native2ascii-utf8 > > native2ascii > > > UTF8 > > ConsoleResources_jp.properties, > ConsoleResources_zh*.properties > > > > > > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.