Page 2 of 2

Re: after update to 3.0.8, apostrophes are ’

Posted: Wed Feb 09, 2011 10:40 pm
by Sajaki
i have a conversion list for these:

Code: Select all

$old=array(‘ä’,'ö’,'ü’,'Ä’,'Ö’,'Ãœ’,'µ’,'ß’,'´’,'²’,'³’,'§’,'°’,'¯’,'¼’,'½’,'¾’,'€’,'–’,'„’,'“’,'‰’,’.’,'”‘,’»’,'«’);

Code: Select all

$new=array(‘ä’,'ö’,'ü’,'Ä’,'Ö’,'Ü’,'µ’,'ß’,'´’,'²’,'³’,'§’,'°’,'¯’,'¼’,'½’,'¾’,'EUR’,'-’,'”‘,’”‘,’o/oo’,’ ‘,’%22′,’»’,'«’);

Re: after update to 3.0.8, apostrophes are ’

Posted: Thu Feb 10, 2011 12:21 pm
by Bramster.
Thanks guys, thats is what I needed. Could I have a look at your complete list Dicky ?

What code are you using to locate the characters ?

I use this to first check out things before I do an update on the database. I want to be sure I am doing the right thing.

Code: Select all

SELECT `post_id`,`post_text` FROM `phpbb_posts` WHERE `post_text` REGEXP '…'
Unfortunately this does not locate all character because when doing the update there are normally more hits then during the select

Re: after update to 3.0.8, apostrophes are ’

Posted: Fri Feb 11, 2011 1:06 am
by D¡cky
Bramster. wrote:Thanks guys, thats is what I needed. Could I have a look at your complete list Dicky ?
It is not in a presentable format. I am working on getting it so you can see it, plus I am trying to check it for accuracy as best as I can.
Bramster. wrote:What code are you using to locate the characters ?

I use this to first check out things before I do an update on the database. I want to be sure I am doing the right thing.

Code: Select all

SELECT `post_id`,`post_text` FROM `phpbb_posts` WHERE `post_text` REGEXP '…'
Unfortunately this does not locate all character because when doing the update there are normally more hits then during the select
This is what I use to replace the characters

Code: Select all

update phpbb_posts set post_text = replace(post_text, 'old_character', 'new_character')
Unfortunately, with this method only one character at a time is fixed. You also need to start with the longest characters leaving the shortest characters for last.

Re: after update to 3.0.8, apostrophes are ’

Posted: Fri Feb 11, 2011 7:55 am
by Bramster.
It is not in a presentable format. I am working on getting it so you can see it, plus I am trying to check it for accuracy as best as I can.
Hold your horses, I am working on a Excel table myself as well.
This is what I use to replace the characters
I first search for the charater, so I know how many hits there are and what is gonna get changed, because doing an updatewithout knowing what is gonna happen is way too dangerous. Therefore I would like people to evaluate my select code, which is:

Code: Select all

SELECT `post_id`,`post_text` FROM `phpbb_posts` WHERE `post_text` REGEXP 'the-xcharacter'

Re: after update to 3.0.8, apostrophes are ’

Posted: Fri Jun 10, 2011 3:25 am
by Wert
I had this problem in a major way and the sql update fixed it right up.

For those who might need it, here's that conversion table that someone posted, converted to nice excel format.

Re: after update to 3.0.8, apostrophes are ’

Posted: Fri May 04, 2012 10:07 am
by elsa23
Hi,

Is this can work ?

Code: Select all

update phpbb_posts set post_text = replace(post_text, 'Ã ', 'à')
there are one space after Ã

thanks a lot :)

Re: after update to 3.0.8, apostrophes are ’

Posted: Fri May 04, 2012 12:26 pm
by Mick
elsa23 wrote:Is this can work ?
Backup your database and try it.

Re: after update to 3.0.8, apostrophes are ’

Posted: Fri May 04, 2012 12:35 pm
by elsa23
Thanks !

And this ?

Code: Select all

update phpbb3_posts set post_text = replace(post_text, '’', '`')

Re: after update to 3.0.8, apostrophes are ’

Posted: Fri May 04, 2012 12:41 pm
by Erik Frèrejean
Mick wrote:Backup your database and try it.
;)

Re: after update to 3.0.8, apostrophes are ’

Posted: Fri May 04, 2012 6:42 pm
by DionDesigns
There should be no need for fancy "conversion tables"...make a backup of the table first, then try this:

Code: Select all

UPDATE phpbb_posts SET post_text = CONVERT(CONVERT(CONVERT(post_text USING latin1) USING binary) USING utf8)
You should also do the following:

Code: Select all

UPDATE phpbb_posts SET post_subject = CONVERT(CONVERT(CONVERT(post_subject USING latin1) USING binary) USING utf8)
UPDATE phpbb_topics SET topic_title = CONVERT(CONVERT(CONVERT(topic_title USING latin1) USING binary) USING utf8)

Re: after update to 3.0.8, apostrophes are ’

Posted: Sat Nov 23, 2013 9:22 am
by joshuadenmark
DionDesigns wrote:There should be no need for fancy "conversion tables"...make a backup of the table first, then try this:

Code: Select all

UPDATE phpbb_posts SET post_text = CONVERT(CONVERT(CONVERT(post_text USING latin1) USING binary) USING utf8)
You should also do the following:

Code: Select all

UPDATE phpbb_posts SET post_subject = CONVERT(CONVERT(CONVERT(post_subject USING latin1) USING binary) USING utf8)
UPDATE phpbb_topics SET topic_title = CONVERT(CONVERT(CONVERT(topic_title USING latin1) USING binary) USING utf8)
Worked great on posts, thanks.

Is it possible to do the same "trick" on the private messages?

Best regards
Peter