如何为意大利语区域设置charset?

时间:2013-12-17 05:27:29

标签: html character-encoding special-characters locale

我在smalltalk服务器中使用html / javascript。我在meta标签中设置了utf-8字符集。但是意大利特殊字符显示不正确。例如,á显示为á 我已经给出了下面的标题值 响应标题:

Accept  */*
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Content-Length  269
Content-Type    application/x-www-form-urlencoded; charset=UTF-8
Cookie VW-WTK-sessionkey=863807508382_ga=GA1.2.1395970228.1381994276
Host    www.example.it
Referer http://www.exapmle.it/hello.html
User-Agent  Mozilla/5.0 (Windows NT 6.1; rv:26.0) Gecko/20100101 Firefox/26.0
X-Requested-With    XMLHttpRequest

请求标题:

Accept  application/json, text/javascript, */*; q=0.01
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Content-Length  85
Content-Type    application/x-www-form-urlencoded; charset=UTF-8
Host    www.example.it
Referer http://www.example.it/index.html
User-Agent  Mozilla/5.0 (Windows NT 6.1; rv:26.0) Gecko/20100101 Firefox/26.0
X-Requested-With    XMLHttpRequest

帖子是

Parameters application/x-www-form-urlencoded

city    á à è é ì í ò ó ù ú
name    á à è é ì í ò ó ù ú

1 个答案:

答案 0 :(得分:0)

当“á”显示为“¡”时,你有一个UTF-8编码的“á”(U + 00E1),即字节0xC3 0xA1,它被误解为ISO-8859-1或windows- 1252编码,如U + 00C3 U + 00A1。

问题没有指定 where (在哪个程序中)“á”显示为“¡”,但请求标题至少有问题。内容类型application/x-www-form-urlencoded没有参数; charset参数被忽略。使用该类型时,根据类型规则,数据必须为URL-encoded

或者,请考虑使用multipart/form-data内容类型。