Charset messing up in VS 2008 JSON Deserialization

守給你的承諾、 提交于 2019-12-11 04:56:50

问题


I'm currently having a kind of weird issue.

I've got a Mail Sending Web Service that is called by passing JSON to a certain URL. Since I got reported some accent issues in the mail sent since a few weeks, I'm inspecting on this issue.

This looks like an encoding issue, that could be caused because we changed the SMTP Sender we're using.

But there's also something that caught my attention, about the deserialization of the JSON into VS.

In fact, I can't see the accent that are into the JSON. All I see through Debug Mode is some random "�" instead of "é". I tryied to specify the Content-Type of the JSON I'm sending with UTF-8 and ISO-8859-1 but none of those are having an impact. Still seeing symbols instead of accents.

In my web.config file, I also put :

<globalization
            requestEncoding="utf-8"
            responseEncoding="utf-8"
  />

But it doesn't seems to do the trick.

Anyone have any information about what would cause the problem?

Thanks

来源:https://stackoverflow.com/questions/31874837/charset-messing-up-in-vs-2008-json-deserialization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!