My Java web application submits an AJAX request that returns JSON such:
{'value': 'aériennes'}
When 'aériennes' is displayed in the webpage, it appears as 'a?riennes', so I guess there's some kind of character encoding problem. The AJAX response headers include
Content-Type application/json
which doesn't appear to include any charset information. I guess this needs to be changed to something like
Content-Type text/html; charset=iso-8859-1 (or charset=utf8)
The server-side of the app is Spring MVC, and I guess there must be a way to set the default charset for each response?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…