(Spring + JSP + jQuery-AJAX + JSON ) setting environment for UTF-8 issue?

前端 未结 3 1856
盖世英雄少女心
盖世英雄少女心 2021-02-20 14:21

I am doing a chat project in java with Spring 3.x which needs Multi-language support.

Here is what I have done.

3条回答
  •  心在旅途
    2021-02-20 14:34

    I would try some debugging in the browser. Use some developer tools in your browser (Developer Tools in Chrome, Firebug extension for Firefox or any other such tool in any other browser) and try to check HTTP response you are getting for your ajax - check if HTTP headers are correctly set (utf8 encoding, etc.) and maybe if ypur special characters are displayed correctly there - so you can see, if you are getting correct answer from the server.

    BTW - I dont see any error in code you posted, everything looks good. Just double check, that page on that you are displaying response with ajax, has utf8 encoding set...

提交回复
热议问题