0
votes

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.

1
do you mean yu are getting boxes in the log generated by the server side code...or the code itself ?Kakarot
@Kakarot i am getting boxes by the code itselfbouncingHippo
which editor do you use, and OS ?Kakarot
@bouncingHippo Sorry but what exactly by the code itself means? Also, are all the steps using the same character set type? Can you provide evidence for the charsets used also so we can have more info?Evandro Pomatti

1 Answers

0
votes

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".