News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Problem with database utf8 and old data

Started by BPLive, March 05, 2010, 05:47:43 AM

Previous topic - Next topic

BPLive


Anyway today I notice the british pound sign was showing Ã,£70.  and some of my international board names have also changed with weird symbols.
www.ChineseDemocracy.com Your Guns N Roses Forum

BPLive

#1
actually it was adding an à  in from of all symbols special characters.. like it was added.

for example

QuoteOMFG! In Prague lowest price - 61 €! In Czech Republic thereÃ,´s a festival with Metallica, Slayer and Megadeth for 60 €!

please help...   

I checked the database.. this character did inject into the data. fffffff
www.ChineseDemocracy.com Your Guns N Roses Forum

Senkusha

#2
I had this problem on my forum too...I ran a script.  Let me see if I can find it for you.

Here you go!

http://www.simplemachines.org/community/index.php?topic=327519.msg2183096#msg2183096
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

BPLive

thanks a lot

I was on the right track.  These entries help but doesn't cure.  Still a mess.  I ran your entries too thanks!

I found these ones at phpbb forum.  they were helpful too, but of course you have to edit the lines for smf.

UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'ß', 'ß') WHERE post_text LIKE '%ß%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, '´', '') WHERE post_text LIKE '%´%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'ä', 'ä') WHERE post_text LIKE '%ä%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'ö', 'ö') WHERE post_text LIKE '%ö%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'ü', 'ü') WHERE post_text LIKE '%ü%';
UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'Ã,,', 'Ä') WHERE post_text LIKE '%Ã,,%';

UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'ß', 'ß') WHERE post_subject LIKE '%ß%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, '´', '') WHERE post_subject LIKE '%´%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'ä', 'ä') WHERE post_subject LIKE '%ä%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'ö', 'ö') WHERE post_subject LIKE '%ö%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'ü', 'ü') WHERE post_subject LIKE '%ü%';
UPDATE phpbb_posts SET post_subject = REPLACE(post_subject, 'Ã,,', 'Ä') WHERE post_subject LIKE '%Ã,,%';

UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'ß', 'ß') WHERE user_sig LIKE '%ß%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, '´', '') WHERE user_sig LIKE '%´%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'ä', 'ä') WHERE user_sig LIKE '%ä%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'ö', 'ö') WHERE user_sig LIKE '%ö%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'ü', 'ü') WHERE user_sig LIKE '%ü%';
UPDATE phpbb_users SET user_sig = REPLACE(user_sig, 'Ã,,', 'Ä') WHERE user_sig LIKE '%Ã,,%';

UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'ß', 'ß') WHERE topic_title LIKE '%ß%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, '´', '') WHERE topic_title LIKE '%´%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'ä', 'ä') WHERE topic_title LIKE '%ä%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'ö', 'ö') WHERE topic_title LIKE '%ö%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'ü', 'ü') WHERE topic_title LIKE '%ü%';
UPDATE phpbb_topics SET topic_title = REPLACE(topic_title, 'Ã,,', 'Ä') WHERE topic_title LIKE '%Ã,,%';
www.ChineseDemocracy.com Your Guns N Roses Forum

Advertisement: