Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Problem with character encoding after site migration
I just recently migrated a TextPattern installation to a new server. It was recommended that I use utf-8 as the character encoding in the new MySQL database (original was latin-1) so I followed those instructions.
Unfortunately that conversion seemed to have messed up some of my posts which now have bad characters embedded in them. Odd thing is that this is very inconsistent so I can’t tell why some posts converted fine and others did not.
It looks like the special back & forward single quotes in the old content have become funny sequence of characters, for example: ’ or
â€Â
In the ‘textpattern’ table I see many ‘Body’ fields that have bad characters within them. However, sometimes the equivalent character in the ‘Body_html’ field has the proper encoded character other times it has the bad raw character data. There seems to be no rhyme or reason!
When bad characters appear, they are typically one of: – ’ “ ” …
Is there any way to fix the data in-place within the database?
Thanks,
Mark
Last edited by mericson (2008-02-04 19:18:04)
Offline
Re: Problem with character encoding after site migration
I’d recommend restoring an old backup (latin1) and setting dbcharset to ‘latin1’ in the textpattern/config.php file. If you’ve added new articles, you’d have to re-add them later on. If you then want to convert to utf8, install the rvm_latin1_to_utf8 plugin.
Offline