0

I have problem I've been working on for the last 3 hours. When I insert in the field something like this:

„It is a beautiful day“ after update I get this

„It is a beautiful dayâ

I am not sure why this started to happen now, before it was working normally. Is this the problem with mysql? Because I type normally this sign, like italic quotes up and than I update it and get this strange â on the end.

Does anyone knows something more about it? I was trying almost everything. My encoding of database is set to utf8-general-ci, of page utf-8. Any help would be appreciated.

stevenspiel
  • 5,775
  • 13
  • 60
  • 89
enigmaticus
  • 548
  • 3
  • 8
  • 26
  • 2
    Getting `â` means a charset problem - your ENTIRE pipeline has to keep the SAME charset (e.g. utf-8) throughout, or have appropriate charset translation logic at the "borders". If you stuff a utf-8 string through a (say) iso-8859 connection or table, then you're going to get corrupted strings like this. That means your client code, your client->database connection, your tables, your fields, ALL have to be set up correctly. – Marc B Dec 19 '13 at 14:19
  • so what do you propose? because the problem is that I have utf-8-general-ci in the database and on page I cannot change it since framework makes it automatically,generates utf-8 – enigmaticus Dec 19 '13 at 14:22
  • make everything utf-8. your client-side data, your db connection, etc... – Marc B Dec 19 '13 at 14:27
  • There are a few different places where you might be able to set this. The database connection code might have an option to us UTF-8, like in the example here: http://stackoverflow.com/a/11249695/1451957 ; I wrote about a few other places where you can "opt in" to UTF-8 here: http://stackoverflow.com/questions/12603421/how-to-compare-and-output-latin-characters/12604900#12604900 ; These might not all be relevant to you (it sounds like you're using a framework, which should be taking care of some of these for you), but it might be a good place to start. – Chris Dec 19 '13 at 14:27

0 Answers0