x.509
x.509

Reputation: 2235

Chinese characters in variable values while debugging

I want to debug some values which are being submitted by a JSP page. The values are in chinese however, when i try to look at the variable value in "Variables" tab in debug mode, it shows me boxes. How can i configure eclispe to set its encoding accordingly, so that it shows me appropriate characters in "variables" value.

P.S: I am not asking about console encoding.

Upvotes: 1

Views: 1902

Answers (2)

Riyad Kalla
Riyad Kalla

Reputation: 10702

You need to go to your Eclipse install directory, edit the eclipse.ini file, scroll to the bottom of the file which are all the -vmargs arguments on separate lines, and add:

-Dfile.encoding=UTF-8

on its own line, then restart Eclipse. Now the host VM running Eclipse will be operating with the UTF-8 encoding and the UI elements in the interface will be able to display those values.

This is assuming that your host operating system is capable of displaying those Unicode characters (I am assuming 'yes' if some relatively new OS like Vista, Win 7, OS X 10.5 and so on).

Upvotes: 1

Agone
Agone

Reputation: 1

Have you tried to modify the character encoding of your web server in the debug configuration?

"Run -> Debug Configuration", then select the "Apache Tomcat -> Your server configuration". In the last tab page ("Common") you can set the encoding. It could solve your problem.

Upvotes: 0

Related Questions