开发者

Ajax response with french encoding

开发者 https://www.devze.com 2023-01-13 03:15 出处:网络
Is it possible to make json response with characters in french 开发者_开发问答encoding? IE6 never invoke callback function to handle json response.Yes it is possible. Otherwise a lot of site wouldn\'t

Is it possible to make json response with characters in french 开发者_开发问答encoding? IE6 never invoke callback function to handle json response.


Yes it is possible. Otherwise a lot of site wouldn't work! :)

Just make sure the server send the data back in UTF-8 encoding.

For example in java it's:

response.setContentType("application/json;charset=UTF-8");


I am using the same jquery ajax request but with spring mvc and oracle. For me this line worked: (In-case if above solution does not work for anyone.)

response.setCharacterEncoding("ISO-8859-1");
0

精彩评论

暂无评论...
验证码 换一张
取 消