Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 97159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:57:05+00:00 2026-05-10T23:57:05+00:00

I have the following issue using java 1.4 I try to display a very

  • 0

I have the following issue using java 1.4

I try to display a very simple HTML document in a JTextPane that contains chinese characters.

If the locale used when launching the java virtual machine is user.language=zh and user.country=CN the graphical characters are rendered correctly.

For any other locale, the characters are rendered as squares.

The difference I see is that java 1.4 uses a different font.properties file for each locale. In this particular case, the font.properties.zh file contains an extra entry:

dialog.plain.0=Arial,ANSI_CHARSET  **dialog.plain.1=\u5b8b\u4f53,GB2312_CHARSET** dialog.plain.1=WingDings,SYMBOL_CHARSET dialog.plain.2=Symbol,SYMBOL_CHARSET 

Now, this entry is not available for the other locales.

The problem I have, is that I need to be able to render this string while using any locale. Furthermore, I can’t modify the font.properties file to add extra entries as I have no control on the JVM used by the client.

In Java 1.5 this problem does not occur.

Is there any way to add this mapping programmatically? Is there any other solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:57:05+00:00Added an answer on May 10, 2026 at 11:57 pm

    Apparently the answer is….

    Not possible for java 1.4 as per this url:

    http://java.sun.com/javase/technologies/core/basic/intl/faq.jsp#desktop-rendering

    Using logical font names:

    • Advantages: These font names are guaranteed to work anywhere, and they enable text rendering in at least the language that the host operating system is localized for (often a much larger range of languages).

    • Disadvantages: The physical fonts used for rendering the text vary between different implementations, host operating systems, and locales, so an application can not achieve the same look everywhere. Also, the mapping mechanisms occasionally limit the range of characters that can be rendered. The latter used to be a big problem on JRE versions before 5.0: for example, Japanese text could only be rendered on Japanese localized host operating systems, not on other localized systems even if Japanese fonts have been installed. For applications using 2D font rendering, this problem is much rarer with JRE version 5.0, because the mapping mechanism now generally recognizes and uses fonts for all supported writing systems if they are installed.

    The only possible way seems to set a font that has known support for extended graphical characters in a hard-coded way, in the component.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 88k
  • Answers 88k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer That's an internal implementation detail subject to change from version… May 11, 2026 at 5:40 pm
  • Editorial Team
    Editorial Team added an answer I was making changes in the wrong view. This works… May 11, 2026 at 5:40 pm
  • Editorial Team
    Editorial Team added an answer have you tried checking the 'Basic Latin' or 'Latin I'… May 11, 2026 at 5:40 pm

Related Questions

We have a Java Applet built using AWT. This applet lets you select pictures
My 7 year old would like to learn, how to program? (his idea not
I had a program work on some images of mine and it returned them
I am using spring-2.5.6 to connect from a standalone application to an Oracle 10g

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.