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,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
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
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Nightcrawler), 803 guests, and 448 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)