harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chunrong Lai (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4735) [classlib][luni] Needs to enhance encoding setting to print Chinese in Linux
Date Wed, 05 Sep 2007 14:05:35 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525103

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 code.

> [classlib][luni] Needs to enhance encoding setting to print Chinese in Linux
> ----------------------------------------------------------------------------
>                 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 = {0x4f60, 0x597d, 0x002c, 0x4e16, 0x754c}; // "Hello, World" in Chinese.GB2312
>         System.out.println(new String(str));
>         System.out.println("你好世界"); // "Hello, World" in Chinese
>     }
> }
> To reproduce the bug, start Xwindow with "LC_ALL" and "LANG" set to "zh_CN.GB2312" (You
can quit Xwindow firstly with /sbin/init 3, export LC_ALL=zh_CN.GB2312, export LANG=zh_CN.GB2312,
then run startx) and run HChinese.
> Without the attached patch. Harmony just can not print Chinese. It will work with the
> However the patch more likes a workaround because it needs hardly code the "GB2312".

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message