中文字符在变量值调试时 [英] Chinese characters in variable values while debugging
问题描述
我想调试一些由JSP页面提交的值。这些值是中文的,但是当我尝试在调试模式下查看变量选项卡中的变量值时,它会显示我的框。如何配置eclispe来相应设置其编码,以便在变量值中显示适当的字符。
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.
PS:
我不是问控制台编码。
推荐答案
您需要转到Eclipse安装目录,编辑 eclipse.ini
文件,滚动到文件的底部,它们都是分开的行上的所有 -vmargs
参数,并添加:
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
<在自己的线上,然后重新启动Eclipse。现在运行Eclipse的主机将使用UTF-8编码操作,界面中的UI元素将能够显示这些值。
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.
这是假设你的主机操作系统能够显示这些Unicode字符(如果像Vista,Win 7,OS X 10.5等相对较新的操作系统,我假设是)。
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).
这篇关于中文字符在变量值调试时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!