Previous Thread
Next Thread
Print Thread
Hop To
#195920 08/31/2007 11:25 AM
Joined: Jul 2007
Posts: 103
member
member
Joined: Jul 2007
Posts: 103
Whenever you import an old UBB classic, it can happen that you see weird texts like:

€ or ‘ instead of é or ë

This SQL scripts updates all the incorrect posts in your database so that after this, everything will goes fine as it should.

Have fun with it, and use it at your own risk! Enter this is your PHPMyadmin for Mysql to run it:
Code
UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, '’', '''')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, '’', ''''))
WHERE `POST_BODY` like '%’%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, 'ë', 'ë')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, 'ë', 'ë'))
WHERE `POST_BODY` like '%ë%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, 'é', 'é')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, 'é', 'é'))
WHERE `POST_BODY` like '%é%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, '“', '“')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, '“', '“'))
WHERE `POST_BODY` like '%“%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, '‘', '”')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, '‘', '”'))
WHERE `POST_BODY` like '%‘%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, 'â€', '”')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, 'â€', '”'))
WHERE `POST_BODY` like '%â€%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, '”¦', '!')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, '”¦', '!'))
WHERE `POST_BODY` like '%”¦%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, 'ï', 'ï')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, 'ï', 'ï'))
WHERE `POST_BODY` like '%ï%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, 'Ã', 'ì')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, 'Ã', 'ì'))
WHERE `POST_BODY` like '%Ã%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, '€', '€')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, '€', '€'))
WHERE `POST_BODY` like '%€%'
;

UPDATE `ubbt_POSTS`
SET 
`POST_BODY`=( REPLACE (`POST_BODY`, '”“', '"')),
`POST_DEFAULT_BODY`=( REPLACE (`POST_DEFAULT_BODY`, '”“', '"'))
WHERE `POST_BODY` like '%”“%'
;


Joined: Dec 2003
Posts: 1,798
Likes: 2
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,798
Likes: 2
Thank you - I seem to remember having some of those issues with my classic import, this didn't find anything, but mebbe it was another board smile


- Allen
- ThreadsDev | PraiseCafe

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
1 members (1 invisible), 304 guests, and 96 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)