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, 开发者_Python百科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.
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).
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.
精彩评论