My webpage has some chinese characters. When the browser text encoding is "Unicode" everything is fine. But when I change it to "Western" the chinese characters are getting messy.
I want the page to display in UTF-8 irrespective of the browser encoding. How to do it?
The response header received for the JSP has Content-Type: "text/html;charset=UTF-8". When I check the response in the network tab, it is proper(in UTF-8). Also JSP has
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Even with all these charset mentions, the browser text encoding is taking preference. Can this be overridden? Can the page always be in "UTF-8" regardless of the browser encoding?
Note: The browser I checked is Firefox.
Text boxes are pre-populated with chinese characters from the server.
This is when the browser text encoding is "Unicode".
document.charset is "UTF-8"
This is when the browser text encoding is "Western".
document.charset is "windows-1252"
Please help.


