문제

In my java server code name = request.getParameter("SUPERHERO.NAME") i am getting a series of boxes on my server side code.

where printing the variable name give me a series of boxes that becomes question marks However, when the page loads i am able to view the chinese characters on the page without a problem.

도움이 되었습니까?

해결책

To solve the problem of un-recognized characters being shown as boxes in your code file (.java files), change the preferences of your editor so that the default encoding is UTF-8. This should solve your issue.

In case you are using Eclipse IDE, you can try the below steps :

1) Navigate to Windows -> Preferences -> General -> Content Types

2) Set UTF-8 as the default encoding for all content types.

3) Windows -> Preferences -> General -> Workspaces

4) Set "Text file encoding" to "Other : UTF-8".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top