Viewing unicode strings in Intellij Idea debugger
How to view Unicode encoded strings in Intellij Idea debugger data view? eg consider following code
String str = "सुझाव"; //some Unicode string: utf-8
String str1 = "u0938u0941u091du093eu0935";
System.out.println(str);
Not able to view the variable- str - in data view of debugger, it shows garbage value. Even though set value shows proper value.
Any suggestions/work-arounds?
Probably, missing some encoding setting somewhere.
Check project encoding. I have same issue. Idea shows variables content encoding in WIN-1252. In version in Editor > File Encodigs
you have: IDE Encoding
, and Project Encoding
. After changing Project Encoding
to UTF-8 everything looks ok.
blank squares means those characteristics are not supported by your IDE font . change IDE font should solve it ( File -> Settings -> Appearance & Behavior -> Appearance )
链接地址: http://www.djcxy.com/p/15408.html上一篇: linux内核模块中的任务数据结构