I'm using extract_json_value from common_schema ( http://common-schema.googlecode.com/ ) to json_decode a field in my MySQL database. It works pretty well...exept for accents.
SELECT common_schema.extract_json_value(value,'prenom') as prenom
FROM metadata where idmetadata = 720871;
returns: Aur\élien
field value in database is: {"prenom":"Aur\élien","classe":"CP"}
Any idea on how i can get "Aurélien" and not "Aur\élien" ?
Thanks
Your issue doesn't seem to be with common schema, but with your charset. Make sure
your MySQL database (and all tables) collation is utf8-general-ci
Your web forms include the HTML attribute accept-charset="UTF-8"
Your html pages include <meta charset="utf-8">
If using gettext for translation, set the codeset in PHP: bind_textdomain_codeset($domain, 'UTF-8');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.