I have read a bunch of different StackOverflow answers and similar questions but none of them have been any help.
I am using Javascript to make an ajax request to get some data in json form.
I am receving json data such as the following:
\u0093title\u0094
Now I believe json is delivered in utf-8 by default, however these characters \u0093and \u0094 I believe are latin1 control characters meant to represent open and close speech marks.
The issue is when I make the GET with Javascript, the response ends up being something like:
“title”
I have tried doing encodeURIComponent( data.body )) and it produces the same result
This is extremely annoying, has anyone else encountered these issues before?
EDIT:
Imagine the following raw JSON data, this is what I am going to retrieve:
\u0093title\u0094
So for example, I run the following piece of jQuery/Javascript to get the above JSON data
$.ajax({
type: "GET",
url: "myurl",
success: function(data){
console.log(data.body);
}
});
The following is printed to the console (which looks fine, except it is omitting the control characters):
title
And then I encode and decode it, which should cancel out and change nothing:
console.log(decodeURIComponent(encodeURIComponent( data.body )))
Except this ends up printing the following:
“title”
Where it has picked up those extra  characters as well as the “ and ”, despite these not showing up in the console before the encode/decode step
“title”in your HTML yes?<meta charset="utf-8">U+0093andU+0094are non-printable characters. Are you sure you don't mean curved quotes?