Bug 902227 - Java application can't display Chinese character.
Java application can't display Chinese character.
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: java-1.7.0-openjdk (Show other bugs)
18
Unspecified Linux
high Severity high
: ---
: ---
Assigned To: jiri vanek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-21 02:59 EST by robberphex
Modified: 2013-04-23 01:48 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-23 01:48:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description robberphex 2013-01-21 02:59:47 EST
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 09:39:04 EST
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 08:06:28 EST
(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 03:36:41 EST
(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 08:08:13 EDT
This is a big usability issue to Chinese users IMHO. Request updates kindly.
Comment 5 jiri vanek 2013-03-25 13:12:41 EDT
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.