Re: UTF8 encoding issues.

Skip to first unread message

Andy Balholm

Jun 6, 2013, 4:35:13 PM6/6/13
On Thursday, June 6, 2013 11:04:31 AM UTC-7, wrote:
Hi there! I'm having the next error when trying to create a JSON
json: invalid UTF-8 in string: "Soci\xe9t\xe9 G\xe9n\xe9rale"
This data comes from a MySQL table with utf8_unicode_ci charset. 
Anyone can help me? How can I encode a string into UTF-8?
Thank you very much.

That string is in ISO-8859-1 or a similar encoding (Perhaps Windows 1252). Either the table's encoding is set incorrectly, or you need to change your MySQL settings. I am not a MySQL user; in PostgreSQL you would need to set the client encoding to UTF8. 
Reply all
Reply to author
0 new messages