Last post Jan 03, 2014 03:04 AM by soppie
Jan 02, 2014 03:39 AM|soppie|LINK
I use a third party webapplication were I can save things in a database with forms and saved information can be requested through an API provided by the third party in xml or json format. Say I saved in a certain field the value "ocean's eleven" (without
the quotes btw). Now when I make an API request with format xml in (eg chrome), I get back :
When I make the same API call with format json I get back:
The recevied xml states
I think it's correct when I make an API call, I should get back "ocean's eleven". Is my assumption correct the third party has an issue with the encoding of the API requests?
Jan 03, 2014 12:50 AM|Terry Guo - MSFT|LINK
You can try to use the Unicode, and you'd better to check the what's the encode of this API.
You can also read this blog, maybe it can help you:
Jan 03, 2014 03:04 AM|soppie|LINK
the article sums it up nice, great to read, but I think it supports my assumption: the xml response I get back from the API states encoding UTF-8 and that's unicode. That's what's bothering me. The XML response tells my browsers: use UTF8 to make it readable
as intended, but it doesn't.
I was getting the xml response by a webrequest in my code behind and saved it in my database, but thought I had set the wrong encoding to the webrequest. So I looked again in different browsers, tried different settings for encoding, but still can't get (like
in my example) "ocean's".
I make use of API request the same way to facebook, twitter etct etc, but never had this issue, so what am I missing here?