Hello!
When I encode an array to JSON I get "u00e1" instead of á.
How could I solve the character encoding?
Thanks
Hello!
When I encode an array to JSON I get "u00e1" instead of á.
How could I solve the character encoding?
Thanks
The browser's default encoding is probably Unicode UTF-8. Try
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
.
Your input data is not Unicode. 0xE1 is legacy latin1/ISO-8859-*/Windows-1252 for á. \u00e1 is the JSON/JavaScript to encode that. JSON must use a Unicode encoding.
Solve it by either fixing your input or converting it using something like iconv.