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] Created: (HARMONY-4735) [classlib][luni] Needs to enhance encoding setting to print Chinese in Linux
Date Tue, 04 Sep 2007 14:58:45 GMT
[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 patch.
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