I have a website form written in Perl that saves user input in multiple languages to a MySQL database. While it has worked perfectly saving and displaying all characters without problems, in PHPMyAdmin the characters always displayed with errors. However I ignored this since the website was displaying characters OK.
Now I've just recently moved the website to a VPS and the database has seemingly enforced ut8mb4 encoding on the data, so it is now displaying character errors on the site. I'm not an expert and find the whole encoding area quite confusing. My question is, how can I:
a) determine how my data is actually encoded in my table?
b) convert it correctly to utf8mb4 so it displays correctly in PHPMyAdmin and my website?
All HTML pages use the charset=utf8
declaration. MySQL connection uses mysql_enable_utf8 => 1
. The table in my original database was set to utf8_general_ci
collation. The original database collation (I just noticed) was set to latin1_swedish_ci
. The new database AND table collation is utf8mb4_general_ci
. Thanks in advance.