Charset messing up in VS 2008 JSON Deserialization

2019-08-14 19:45发布

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

0条回答
登录 后发表回答