I am using a latin1_swedish_ci database to store json_encoded arrays. Previously, I have made these arrays in javascript by using JSON.stringify().
I am now loading these arrays, editing them with PHP and saving them again. In order to do so, I am using json_decode() and json_encode() functions.
However, this converts the charset from latin1 to utf-8, and the foreign letters are changed after saving the altered arrays back to the database.
What would be the best way to avoid this? Should I simply convert the altered arrays from utf-8 to latin1 before saving them, and how would I do so?
Thanks!