apparently ISO2022_CN_GB is Mandarin (http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html)
since this is most decidedly DBCS did you load CJK IME /Keyboard and Fonts?

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- From: "red phoenix" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, May 08, 2007 8:47 PM
Subject: Re: Struts2 character code question


I tried follows in test.do:
String name=request.getParameter("Name");
System.out.println(new String(name.getBytes("UTF-8"), "gb2312"))
it still show [EMAIL PROTECTED],Why?



On 5/8/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Red,

red phoenix wrote:
> If I input English name in the field Name in JSP,when I submit,the
> test.do will receive right English name,but when I input Chinese name
> in the field Name in JSP, test.do will receive not right name,it will
> show [EMAIL PROTECTED]

This is what you get when you print out a byte array. Try converting the
byte array to a String using "new String(bytes, charset)" and printing
that.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQJwZ9CaO5/Lv0PARAmyvAJ9aCJZ/MINdBzS18ytQMgzf4M8D3ACffHSG
Ldprq3v5ZTLxYF80HoafTOY=
=vx7I
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to