I am struggling with my json answer as I got different answer when I work localy and on my hosted server (1and1).
I use jquery autocomplete and $.getJSON
to retrieve data from my database.
When I work locally my JSON answer doesn't contain blank line at the begining of my answer and the accentued characters are well interpreted.
However when I use same code on my hosted server I got a JSON answer with a blank line at the top of my answer and accentued chars are not well interpreted.
The answer of my JSON looks like
[{"id":"17035","label":"45110-Germigny-des-Pr\u00c3\u00a9s","value":"45110-Germigny-des-Pr\u00c3\u00a9s"},{"id":"17041","label":"45110-Saint-Martin-d'Abbat","value":"45110-Saint-Martin-d'Abbat"}]
I set the header of my php script to utf-8 but doesn't help.
below the output with non encoded chars1
Any help or clue on that issue?