users@glassfish.java.net

[gf-users] Chinese character support

From: Billy <wmjhappy_ok_at_126.com>
Date: Fri, 26 Dec 2014 20:50:26 +0800

Hi~

I'm a Chinese developer working on Windows 7 operation system, and I'm using
glassfish 4.1 and eclipse for java ee edition(luna 64bit) to develop a
jax-rs application, but i found something really strange to me:

If i execute the following code, I will get a messy string totally different
from the definition from eclipse console while it is normal in tomcat 7.

 

String src = "Chinese character";/* note that the "Chinese character" is not
the content of variable src, it is a Chinese character string */

System.out.println(src);

 

Here is what I got:



Even if I specified "-Dfile.encoding=UTF-8" parameter in "asadmin" command,
nothing still happens.

So, have i missed something?

 

Yours sincerely, WANG mingjun.






image003.jpg
(image/jpeg attachment: image003.jpg)