I'm changing a website (PHP, MYSQL) to another server, where I'm configuring it in a Linux - Apache environment. The problem is that some pages are displaying character encoding errors. The data is stored in mysql as latin1_swedish_ci , and the php files involved are also encoded in iso-8859-1 . PHPMyAdmin, however, displays this data correctly if I make a query. HTTP headers are showing "text/html; charset=iso-8859-1" so nothing wrong there.
I don't know where to look to fix this issue. I don't know if it's an Apache problem, or PHP that somehow tries to read data as utf-8 instead of what it really is .
This is currently the output of " SHOW VARIABLES LIKE '%char%'; "
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+