Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

display chinese character in eclipse console output

I am trying to display some Chinese characters in the GB2312 encoding in the eclipse console. I realize that in Run Dialog -> Common tab -> Console Encoding, I can choose additional encodings other than the default CP1252. However, how I can add additional encodings, like GB2312?

Thanks.

like image 695
poiuy Avatar asked Jun 27 '09 05:06

poiuy


People also ask

How do I show console output in Eclipse?

From the menu bar, Window → Show View → Console. Alternately, use the keyboard shortcut: Mac: Option - Command - Q , then C , or. Windows: Alt - Shift - Q , then C.

How do I display Japanese characters in Eclipse?

You can set that by Window > Preferences > General > Workspace > Text File Encoding.


1 Answers

From this thread:

Since 3.4 (Ganymede), the default encoding is inherited from the resource (project) associated with the launch configuration.
If encoding is not specified for the project - encoding configured for the workspace or system default encoding is used.

alt text
(source: eclipse.org)

Since it appears you cannot change console encoding anywhere else but in the Run configuration's common tab (see this thread), I am not sure it can be done at this point.
That already has some side effect like bug 238945.

As illustrated by this article, you can only change the encoding once.

like image 186
VonC Avatar answered Oct 20 '22 08:10

VonC