Server-side JSON with accented char
Server-side JSON with accented char
 itajackass            
            
                Posts: 169Questions: 51Answers: 3
itajackass            
            
                Posts: 169Questions: 51Answers: 3            
            I use server side processing to retrieve a JSON.
This work:
{
  "draw": 1,
  "recordsTotal": 57,
  "recordsFiltered": 57,
  "data": [
    [
      "Test",
      "Test"
    ],
...
}
But this NOT ( ì causing problem):
I get error: DataTables warning: table id=tabellaRisultati - Invalid JSON response.
{
  "draw": 1,
  "recordsTotal": 57,
  "recordsFiltered": 57,
  "data": [
    [
      "Testì",
      "Test"
    ],
...
}
How to solve this ?
This discussion has been closed.
            
Answers
This is valid JSON:
So there must be something else causing the issue. Can you give us a link to the page or use the debugger please?
Allan
I'm working on localhost sorry.
I tried also on jsfiddle and it work!
http://jsfiddle.net/nzn5m6vL/553/
So the problem is on my localhost but i don't know where...
That's odd that it's working on the fiddle, but not locally. Are there different library versions involved? Or something other interactions going on perhaps?
C
Is your page UTF8? Have you set the mime type for it in the header? Likewise is your database connection UTF8? Is the database's character set UTF8?
Allan