Please enable the run console to display CJK fonts.

IDEA couldn't display UTF8 CJK fonts in the run console.
No matter the 3.x or 4.x.
I am not sure whether that's the problem of setting, but in my unittest console,
it can display them normally.

Thanks and regards,
NG


3 comments
Comment actions Permalink

More information here.
I am using winxp Simple Chinese version.
In irida, I set the File-Encoding -> Default-Encoding = UTF-8, checked the "Files detected as encoded in UTF-family encodings automatically load in UTF" option.

While I run the attachement class in main(), it make a wrong output to the window. But if I use unittest to call up the output method, the output is normal.

Please have a try.

btw. while I change the File-Encoding -> Default-Encoding = GBK and didn't recompile the class, run main() can make a normal output...



Attachment(s):
testit.java
0
Comment actions Permalink

More information.

System's properties:

skey = 'java.runtime.name' props.get(keys) = 'Java(TM) 2 Runtime Environment, Standard Edition'
skey = 'sun.boot.library.path' props.get(keys) = 'Y:\j2sdk142\jre\bin'
skey = 'java.vm.version' props.get(keys) = '1.4.2_04-b05'
skey = 'java.vm.vendor' props.get(keys) = 'Sun Microsystems Inc.'
skey = 'java.vendor.url' props.get(keys) = 'http://java.sun.com/'
skey = 'path.separator' props.get(keys) = ';'
skey = 'idea.launcher.port' props.get(keys) = '7534'
skey = 'java.vm.name' props.get(keys) = 'Java HotSpot(TM) Client VM'
skey = 'file.encoding.pkg' props.get(keys) = 'sun.io'
skey = 'user.country' props.get(keys) = 'CN'
skey = 'sun.os.patch.level' props.get(keys) = 'Service Pack 1'
skey = 'java.vm.specification.name' props.get(keys) = 'Java Virtual Machine Specification'
skey = 'user.dir' props.get(keys) = 'Z:\SHGF_VSS\SHGFFTP'
skey = 'java.runtime.version' props.get(keys) = '1.4.2_04-b05'
skey = 'java.awt.graphicsenv' props.get(keys) = 'sun.awt.Win32GraphicsEnvironment'
skey = 'java.endorsed.dirs' props.get(keys) = 'Y:\j2sdk142\jre\lib\endorsed'
skey = 'os.arch' props.get(keys) = 'x86'
skey = 'java.io.tmpdir' props.get(keys) = 'C:\DOCUME1\ADMINI1\LOCALS~1\Temp\'
skey = 'line.separator' props.get(keys) = '
'
skey = 'java.vm.specification.vendor' props.get(keys) = 'Sun Microsystems Inc.'
skey = 'user.variant' props.get(keys) = ''
skey = 'os.name' props.get(keys) = 'Windows XP'
skey = 'sun.java2d.fontpath' props.get(keys) = ''
skey = 'java.library.path' props.get(keys) = 'Y:\j2sdk142\bin;.;C:\WINDOWS\System32;C:\WINDOWS;..\bin;Z:\ant\ant162\bin;Y:\j2sdk142\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\UltraEdit;C:\Program Files\Rational\common;C:\Program Files\UltraEdit'
skey = 'java.specification.name' props.get(keys) = 'Java Platform API Specification'
skey = 'java.class.version' props.get(keys) = '48.0'
skey = 'java.util.prefs.PreferencesFactory' props.get(keys) = 'java.util.prefs.WindowsPreferencesFactory'
skey = 'os.version' props.get(keys) = '5.1'
skey = 'user.home' props.get(keys) = 'C:\Documents and Settings\Administrator'
skey = 'user.timezone' props.get(keys) = ''
skey = 'java.awt.printerjob' props.get(keys) = 'sun.awt.windows.WPrinterJob'
skey = 'idea.launcher.bin.path' props.get(keys) = 'Z:\Win2kapp\IntelliJ3290\bin'
skey = 'file.encoding' props.get(keys) = 'UTF-8'
skey = 'java.specification.version' props.get(keys) = '1.4'
skey = 'java.class.path' props.get(keys) = 'Y:\j2sdk142\jre\lib\jce.jar;Y:\j2sdk142\jre\lib\sunrsasign.jar;Y:\j2sdk142\jre\lib\jsse.jar;Y:\j2sdk142\jre\lib\charsets.jar;Y:\j2sdk142\jre\lib\plugin.jar;Y:\j2sdk142\jre\lib\rt.jar;Y:\j2sdk142\jre\lib\ext\sunjce_provider.jar;Y:\j2sdk142\jre\lib\ext\dnsns.jar;Y:\j2sdk142\jre\lib\ext\ldapsec.jar;Y:\j2sdk142\jre\lib\ext\localedata.jar;Z:\SHGF_VSS\SHGFFTP\classes;Z:\SHGF_VSS\SHGFFTP\lib\log4j-1.2.8.jar;Z:\SHGF_VSS\SHGFFTP\lib\ojdbc14.jar;Y:\SourceCollector\junit3.8.1\junit.jar;Y:\SourceCollector\junit3.8.1\GroboTestingJUnit-1.1.0-core.jar;Z:\Win2kapp\IntelliJ3290\lib\idea_rt.jar'
skey = 'user.name' props.get(keys) = 'Administrator'
skey = 'java.vm.specification.version' props.get(keys) = '1.0'
skey = 'java.home' props.get(keys) = 'Y:\j2sdk142\jre'
skey = 'sun.arch.data.model' props.get(keys) = '32'
skey = 'user.language' props.get(keys) = 'zh'
skey = 'java.specification.vendor' props.get(keys) = 'Sun Microsystems Inc.'
skey = 'awt.toolkit' props.get(keys) = 'sun.awt.windows.WToolkit'
skey = 'java.vm.info' props.get(keys) = 'mixed mode'
skey = 'java.version' props.get(keys) = '1.4.2_04'
skey = 'java.ext.dirs' props.get(keys) = 'Y:\j2sdk142\jre\lib\ext'
skey = 'sun.boot.class.path' props.get(keys) = 'Y:\j2sdk142\jre\lib\rt.jar;Y:\j2sdk142\jre\lib\i18n.jar;Y:\j2sdk142\jre\lib\sunrsasign.jar;Y:\j2sdk142\jre\lib\jsse.jar;Y:\j2sdk142\jre\lib\jce.jar;Y:\j2sdk142\jre\lib\charsets.jar;Y:\j2sdk142\jre\classes'
skey = 'java.vendor' props.get(keys) = 'Sun Microsystems Inc.'
skey = 'file.separator' props.get(keys) = '\'
skey = 'java.vendor.url.bug' props.get(keys) = 'http://java.sun.com/cgi-bin/bugreport.cgi'
skey = 'sun.io.unicode.encoding' props.get(keys) = 'UnicodeLittle'
skey = 'sun.cpu.endian' props.get(keys) = 'little'
skey = 'sun.cpu.isalist' props.get(keys) = 'pentium i486 i386'

0
Comment actions Permalink

Did you create this test file in IDEA itself? It doesn't look like UTF-8 to me, but rather Chinese Simplified (GB2312).

0

Please sign in to leave a comment.