hi.

it seems there is some problem with one of my sites where drupal is corrupting some of the data - it is making "'"s into "’"s as well as mangling other characters. this seems to be happening on a live drupal site during the submitting of new data.

does anybody have any idea why this could be happening?

the strange thing is that it actually looks like it might display ok on the website - but only in some instances.

erik

Comments

erikhopp’s picture

n/m

Steven’s picture

This is a problem with character encodings. Either something is causing data to be interpreted as ISO-8859-1 (Latin-1) instead of UTF-8 (Unicode), or you have a broken filter module installed which calls htmlentities().

--
If you have a problem, please search before posting a question.

erikhopp’s picture

(using phpmyadmin) so should all the collation fields be set to "uft8_unicode_ci" instead of "latin1_swedish_ci"?

if so, i have no idea how they got changed from that in the first place.

http://mediamutiny.org

Abalieno’s picture

I don't really know why it happens but I recently dumped the DB and reuploaded it without any change at all and I got the exact same corruption problem.

As you dump the DB all the fields are exported as swedish1_latin_ci

I don't know what causes the corruption but everything was displaying correctly on my site before I exported the DB and then reuploaded it.

This with a standard install of Drupal 4.6.0

-Abalieno

Abalieno’s picture

Btw, if you still have the problems there's a workaround to make sure everything works properly. Go to phpmyadmin, the home page and check the "MySQL connection collation".

Make sure that it is the same of the fields of your database. The fields on mine were set at latin1_swedish while the connection collation at utf8. That brought to a database corruption.

Now I set everything to latin1 and it "seems" to work, even if I'm not sure if that's the appropriate setting.

-Abalieno

sepeck’s picture

be a Drupal bug then?

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide