Greetings- I transferred over my Drupal website using the excellent instructions drupal.org has.

But for some reason, but occasionally, bullet points or apostrophes that I transferred over end up looking like ’ and • . how can I correct this?

Thank you!

Comments

jeffspanos’s picture

I just installed my database again and the same problems happened.

Do I really have to go through each post and manually delete these goofy characters?

gonzocoder’s picture

When you say 'transferred over' - do you mean to a new host, new machine or where? Have you moved from a Windows box to a Linux one or vice versa?

Gonz

Anonymous’s picture

This may be a problem with the MySql version. If your new host has v4.1x and the old host has 4.0, then there are unicode parsing issues.

Check out this module for one fix.

jeffspanos’s picture

thank you, but i actually moved from Dreamhost, which has 5.x to MediaTemple, which has 4.1. Could that still be the problem?

Anonymous’s picture

Probably. Read this post- the guy has similar problem migrating from 5 to 4.1

I'm not familiar enough with 5 to be of much help myself I afraid. You could try asking on the MySQL support forum.

jeffspanos’s picture

I wish I knew more about mysql- If the database was in Excel, for example, I could use the "find/replace" option to turn each goofy character into what it should be. There is only about 5 of them, so that would be very fast if there is a way to do this via mysqlAdmin.

jeffspanos’s picture

update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

or something similar?

cog.rusty’s picture

These look like Unicode characters displayed as pairs of non-Unicode characters. I have seen something similar once, when editing a database dump with a text editor not capable of Unicode, but my understanding is only circumstantial.

Since both your MySQL versions are fully capable of Unicode, probably the target database does not realize that it is Unicode. You could try the "ALTER DATABASE dbname DEFAULT ..." and "ALTER TABLE tblname DEFAULT ..." queries mentioned in the following thread to see if they help:

http://drupal.org/node/104510

I don't believe "ALTER TABLE tblname CONVERT TO ..." queries will be needed, but as I said my understanding is lacking.

jeffspanos’s picture

I just used a free program called "SQL Manager 2005 Lite for MySQL" that I found on download.com

Then, for every goofy character, I replaced it in the comments and the nodes using this script:

update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

ta da!

I don't know what would happen if my host upgrades to mysql 5, but I'm happy to find a fix.