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

  • SEARCH
  • Home
  • 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 6810671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:14:02+00:00 2026-05-26T20:14:02+00:00

I have the following code: import java.io.PrintStream; import java.io.UnsupportedEncodingException; import java.util.Locale; public final class

  • 0

I have the following code:

import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.util.Locale;

public final class ChineseCharacterDemo {

    public static void main(String[] args) throws UnsupportedEncodingException {
        Locale locale = new Locale("zh", "CN");
        System.out.println(locale.getDisplayLanguage(Locale.SIMPLIFIED_CHINESE));
    }

}

And even after setting the character encoding of the Eclipse console to UTF-8, I get boxes, instead of the following:

中文

What am I doing wrong?


EDIT-

After changing the Eclipse console font to something capable of rendering Chinese characters, I get the following, incorrect, display:

enter image description here

But, when I copy/paste the text here, it correctly renders the Simplified Chinese text. Again, what’s going on here? Actually, if you look at the rendered text in the console, it’s the correct characters, but they’re on their side!


Resolution-

So, it turns out that I needed to do the following:

  1. Change character encoding of Eclipse console to UTF-8
  2. Change font to Arial Unicode MS (i.e. any font capable of rendering Chinese text)
  • 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. Editorial Team
    Editorial Team
    2026-05-26T20:14:03+00:00Added an answer on May 26, 2026 at 8:14 pm

    Change the font for the Console to one which actually contains the Chinese characters you need to see.

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

Sidebar

Related Questions

I have following code in Java: import java.util.*; public class longest{ public static void
I have the following code: import java.net.InetAddress; public class lookup { public static void
I have the following simple code: import java.io.*; class IO { public static void
I have the following simple Java code: package testj; import java.util.*; public class Query<T>
I have the following Java code: import java.util.Arrays; import java.util.Collections; public class Test {
I have the following code: import java.util.*; public class SellTransaction extends Transaction { private
From the following code : import java.io.*; class fileTester { public static void main(
I have the following Java code: import java.util.concurrent.*; class Foo{ static Semaphore s =
Please have a look at following code : import java.util.ArrayList; import java.util.List; class Main{
I have the following test code. import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.FutureTask; class MyTask

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.