Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 51766 invoked from network); 5 Sep 2007 14:05:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2007 14:05:56 -0000 Received: (qmail 2819 invoked by uid 500); 5 Sep 2007 14:05:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 2734 invoked by uid 500); 5 Sep 2007 14:05:50 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 2725 invoked by uid 99); 5 Sep 2007 14:05:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 07:05:50 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 14:05:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B9F3D714201 for ; Wed, 5 Sep 2007 07:05:35 -0700 (PDT) Message-ID: <20880051.1189001135757.JavaMail.root@brutus> Date: Wed, 5 Sep 2007 07:05:35 -0700 (PDT) From: "Chunrong Lai (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-4735) [classlib][luni] Needs to enhance encoding setting to print Chinese in Linux In-Reply-To: <22906418.1188917925672.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4735?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525103 ]=20 Chunrong Lai commented on HARMONY-4735: --------------------------------------- I agree with that. The encoding should be read from run time environment = via System.getProperties or other methods instead of be directly in the cod= e. > [classlib][luni] Needs to enhance encoding setting to print Chinese in Li= nux > -------------------------------------------------------------------------= --- > > Key: HARMONY-4735 > URL: https://issues.apache.org/jira/browse/HARMONY-4735 > Project: Harmony > Issue Type: Bug > Environment: Linux32 [Fedora] > Reporter: Chunrong Lai > Attachments: H4735.println.workaround.patch > > > Below simple example shows the bug. > public class HChinese { > public static void main(String argv[]) { > char []str =3D {0x4f60, 0x597d, 0x002c, 0x4e16, 0x754c}; // "Hell= o, World" in Chinese.GB2312 > System.out.println(new String(str)); > System.out.println("=E4=BD=A0=E5=A5=BD=E4=B8=96=E7=95=8C"); // "H= ello, World" in Chinese > } > } > To reproduce the bug, start Xwindow with "LC_ALL" and "LANG" set to "zh_C= N.GB2312" (You can quit Xwindow firstly with /sbin/init 3, export LC_ALL=3D= zh_CN.GB2312, export LANG=3Dzh_CN.GB2312, then run startx) and run HChinese= . > Without the attached patch. Harmony just can not print Chinese. It will w= ork with the patch. > However the patch more likes a workaround because it needs hardly code th= e "GB2312". --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.