XF 2.1 Replacing characters

karabaja

Member
Hi!

After migrating from vBulletin to XF 2.1 I had problems with characters. vBulletin was UTF-9 and XF. However, some letters were replaced with hieroglyphs after import.

Reimport is no longer an option. It's too late for that.

I changed the characters in the message text successfully using:

Code:
UPDATE `xf_post`
SET `message` = replace(message, '’', "'")

How can I do the same in thread title and usernames?

Thanks
 
As always, take a backup before running any queries against the database.
SQL:
UPDATE `xf_thread` SET `title` = replace(title, '’', "'")

UPDATE `xf_user` SET `username` = replace(username, '’', "'")


There may also be other locations which need changing such as profile posts, poll titles, etc.
You can check the database for the table and column names.
 
Thank you @Brogan. I am aware that there are a lot of places where characters need to be replaced. It would be good if there was some general query that would replace the wrong characters in the whole database without having to know individually the names of the tables and columns in which I replace them.

Update:

I'm not sure what going on and why it doesen't work.

Code:
Output from SQL command UPDATE `xf_thread` SET `title` = replace(title, 'è', "č") ..

No data returned

Edit 2: It desent work from webmin, I had to do it using Putty. ;)


Code:
UPDATE xf_thread SET title = REPLACE(title,'è','č');
Query OK, 1254 rows affected (0.114 sec)
Rows matched: 8559  Changed: 1254  Warnings: 0
 
Last edited:
Back
Top Bottom