charset encoding and mysql queries
-
Greetings,
I have an issue which was discussed in other posts – but my case is different and thi si swhy I raise anew subject.
I use wordpress 2.1 and mysql 5.0I have national characters in my posts which are encoded in latin2. Specifically:
– the server encoding is utf-8
– the table encoding is latin2When doing an mysqldump –default-character-set=latin2 … I get post contents which are indeed encoded in latin2.
The problem I have is that wordpress plainly refuses to properly prsent these letters. I tried a huge amount of combinations and I am at a stage where:
– the encoding in mysql is latin2
– the meta charset on the page is iso-8859-2
– in wp-db.php I explicitly issue a mysql_query(“SET NAMES ‘latin2′”) and a mysql_query(“SET CHARACTER_SET latin2”)My blog at http://blog.swiatek.name will not help you much (it is Polish) but the situation is that the national letters are not displayed at all.
If I do not do the mysql_query calls above I get question amrks (?) instead of the letters.I am desperate after spending days in dumping, loading etc and I reach a moment where I do not know what to do more. The problems appeared after migraitng to mysql 5.0 but the problem is wider now as I have loaded and loaded aagin many versions of my posts (with different combinations of charsets).
The main question would be: what kind of conversion does mysql perform when being queried for text data? This is the lat thing I can think of in teh context of all my exercises.
Ideally – has anyone had the same probelm and found some magic to fix it? 🙂Thanks in advance for your help,
Wojtek
The topic ‘charset encoding and mysql queries’ is closed to new replies.