Bug 902227 - Java application can't display Chinese character.
Summary: Java application can't display Chinese character.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.7.0-openjdk
Version: 18
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-21 07:59 UTC by robberphex
Modified: 2013-04-23 05:48 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-23 05:48:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test Chinese charactor (480 bytes, text/x-java)
2013-01-21 07:59 UTC, robberphex
no flags Details

Description robberphex 2013-01-21 07:59:47 UTC
Created attachment 684078 [details]
Test Chinese charactor

Description of problem:

The Chinese character in Java application will was replace by box.

Version-Release number of selected component (if applicable):

In package java-1.7.0-openjdk-1.7.0.9-2.3.4.fc18.x86_64

How reproducible:

Compile Test.java and run it.

Steps to Reproduce:
1. #javac Test.java
2. #java Test
  
Actual results:

You can see the Window display four boxes.

Expected results:

The window will display "中文测试".

Additional info:

Temporary solution:
Delete file /usr/lib/jvm/java/jre/lib/fontconfig.bfc and /usr/lib/jvm/java/jre/lib/fontconfig.Fedora.bfc .

Edit file /usr/lib/jvm/java/jre/lib/fontconfig.Fedora.properties.src
replace "filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/cjkunifonts-uming/uming.ttc" with "filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/cjkuni-uming/uming.ttc"
I am not sure to edit "filename.AR_PL_ZenKai_Uni=/usr/share/fonts/cjkunifonts-ukai/ukai.ttc".

DON'T forget to add dependent packagers.

Comment 1 jiri vanek 2013-01-22 14:39:04 UTC
The fontconfig files are redundant in JDK8, and should be redundant also in JDK7 (!should!, the backport was not complete)

Can you try to delete all fontconfig files and try your app?

Comment 2 robberphex 2013-02-18 13:06:28 UTC
(In reply to comment #1)
> The fontconfig files are redundant in JDK8, and should be redundant also in
> JDK7 (!should!, the backport was not complete)
> 
> Can you try to delete all fontconfig files and try your app?

I just want packager edit package java-1.7.0-openjdk-1.7.0.9-2.3.4.fc18.x86_64

Comment 3 Alick Zhao 2013-02-28 08:36:41 UTC
(In reply to comment #1)
> The fontconfig files are redundant in JDK8, and should be redundant also in
> JDK7 (!should!, the backport was not complete)
> 
> Can you try to delete all fontconfig files and try your app?

Hi jiri, I followed your advice and tried with another Java app (JabRef) and it works. Chinese characters can be displayed. Please consider to update the package with the redundant files removed.

Another small question: the font in use seems to be the user's fontconfig preference. Can you confirm that?

Comment 4 Alick Zhao 2013-03-18 12:08:13 UTC
This is a big usability issue to Chinese users IMHO. Request updates kindly.

Comment 5 jiri vanek 2013-03-25 17:12:41 UTC
Builds with fix of this were pushed to fedora.
if they will pass theirs usual QA, I'm for inclusion into next CPU for Rhel
http://pkgs.fedoraproject.org/cgit/java-1.7.0-openjdk.git/commit/?id=89e2aea2f9880efd4ad773ef9dc566225c9ae9ef


Note You need to log in before you can comment on or make changes to this bug.