Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (FordDoctor), 50 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 05/13/08
Posts: 596
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 14
SteveS 14
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
driv 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#195920 - 08/31/07 11:25 AM Database encoding fix
nims2 Offline
member
Registered: 07/04/07
Posts: 122
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 '%”“%'
;

Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#196095 - 09/03/07 01:46 AM Re: Database encoding fix [Re: nims2]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
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 \:\)
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10489 Members
36 Forums
33841 Topics
181707 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image