after update to 3.0.8, apostrophes are ’

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
bsdmike
Registered User
Posts: 164
Joined: Tue Mar 28, 2006 1:27 pm

after update to 3.0.8, apostrophes are ’

Post by bsdmike » Mon Dec 20, 2010 10:14 pm

Just upgraded from 3.0.7PL1 to 3.0.8.

Since I am on a shared host, I downloaded my database, ran the conversion, then uploaded it.
I think I messed up something along the way.

Apostrophes are now ’.

New posts with Apostrophes work ok.

I am running US English. Have a feeling it had something to do with that..
Wonder what I did wrong with the conversion...

Is there an easy way to fix this?

Thank you,
Mike

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: after update to 3.0.8, apostrophes are ’

Post by D¡cky » Tue Dec 21, 2010 5:33 am

Unfortunately, there is not an easy way to fix it. The US English language would not have caused this problem since all phpBB3 languages use UTF8. The problem is caused by not using the same encoding when exporting and importing the databases. What tools did you use to export/import?
Did you open the sql file in a text editor and save it?
Do you still have the original 3.0.7-PL1 file that you exported from your host?
Do the apostrophes show fine on your local server?
Have you hugged someone today?

bsdmike
Registered User
Posts: 164
Joined: Tue Mar 28, 2006 1:27 pm

Re: after update to 3.0.8, apostrophes are ’

Post by bsdmike » Tue Dec 21, 2010 11:58 am

Thank you for your reply.
I just checked...it is messed up on the local database too.

To get the database I used the tool from the admin control panel to save it to a local file, to a gzip file.
I downloaded it. I imported it using something like: mysql database -u -p < file.sql..
I ran the conversion..then did a mysqldump on the local machine....
then uploaded and did the mysql import..

I still have the original database. I created a new one when I did the update...plus copies of the gzipped
version.

It also seems more than just apostrophes were messed up...

Of course it has taken two weeks for anybody to notice this...so I have two weeks of postings.

Think its possible to reconvert the old database..
Delete anything older than two weeks on the new one...
Reimport the old stuff?

edit: might this help?
http://wiki.typo3.org/UTF-8_support#Con ... e_to_UTF-8

Thanks,
Mike

carlosburgossanz
Registered User
Posts: 48
Joined: Thu Dec 25, 2008 11:05 am

Re: after update to 3.0.8, apostrophes are ’

Post by carlosburgossanz » Tue Dec 21, 2010 4:40 pm

Hi,

I post two years ago a solution for your problem, but it's in spanish:
http://www.phpbb-es.com/foro/soporte-ph ... ml#p100545

If you could translate that page (via google), maybe you can understand all process to converse data and have not strange symbols on your posts.

I hope this help.

Regards.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: after update to 3.0.8, apostrophes are ’

Post by D¡cky » Tue Dec 21, 2010 7:25 pm

bsdmike wrote:edit: might this help?
http://wiki.typo3.org/UTF-8_support#Con ... e_to_UTF-8
That may help or even Carlos' method may help. Another method that would work is

Code: Select all

update phpbb_posts set post_text = replace(post_text, 'old_character', 'new_character')
You may have to build your own table to correct the characters. Your problem is that the database has been imported twice with the incorrect encoding, doubly messing up the characters. As Carlos pointed out in his topic, this was most likely caused by MySQL on your local server and your online server using different default encodings.

You could run the conversion again, but you need to make sure the import is done with the proper encoding. You could also use the already converted database and correct the characters in that database. Once the characters are corrected, export the database using the UPDATE format. Then when you import into your online database, it will update the older posts and not touch the newer posts.
Have you hugged someone today?

bsdmike
Registered User
Posts: 164
Joined: Tue Mar 28, 2006 1:27 pm

Re: after update to 3.0.8, apostrophes are ’

Post by bsdmike » Wed Dec 22, 2010 2:01 am

Thanks everybody...I wonder what the best approach might be...

Assuming I rebuilt the old database with utf8, how do you export the database using the UPDATE format?

How would I then import the sql records stored in update format?

What would happen to the old posts that users tried in vane edit because of these characters?

Or If I instead did this: (for all combinations of munged characters..)
update phpbb_posts set post_text = replace(post_text, 'old_character', 'new_character')

What would I put for old_character? Would it be:
update phpbb_posts set post_text = replace(post_text, '’','\'')

Thank you all for your help,
Mike

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: after update to 3.0.8, apostrophes are ’

Post by D¡cky » Wed Dec 22, 2010 4:23 am

bsdmike wrote:What would I put for old_character? Would it be:
update phpbb_posts set post_text = replace(post_text, '’','\'')
Yes, that is correct.
bsdmike wrote:How would I then import the sql records stored in update format?
Using phpMyAdmin, export just the posts table. When exporting, you have the option to set the Export Type, one of the options being UPDATE. There is probably a way to do this with the MySQL command line, but I never bothered to figure out what the command is. Once the table is exported, you import it the same way as any sql file.
Have you hugged someone today?

Bramster.
Registered User
Posts: 151
Joined: Thu Mar 04, 2010 7:42 am

Re: after update to 3.0.8, apostrophes are ’

Post by Bramster. » Tue Feb 08, 2011 9:37 am

Hi all,

I have tried the following several times on our forum. It was successful

Code: Select all

update phpbb_posts set post_text = replace(post_text, 'old_character', 'new_character')
BUT now I want to replace this ´ by this '

How to do that ? I get an error, probably because of the new_character being a '

Code: Select all

update phpbb_posts set post_text = replace(post_text, '´', ''')

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: after update to 3.0.8, apostrophes are ’

Post by Erik Frèrejean » Tue Feb 08, 2011 12:10 pm

''' can't be used. You'll have to escape the middle one, use '\'' instead.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

Bramster.
Registered User
Posts: 151
Joined: Thu Mar 04, 2010 7:42 am

Re: after update to 3.0.8, apostrophes are ’

Post by Bramster. » Tue Feb 08, 2011 12:36 pm

So this would be the correct code to replace ´ with '

Code: Select all

update phpbb_posts set post_text = replace(post_text, '´', '\'')
?

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: after update to 3.0.8, apostrophes are ’

Post by Erik Frèrejean » Tue Feb 08, 2011 12:41 pm

Yes
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

Bramster.
Registered User
Posts: 151
Joined: Thu Mar 04, 2010 7:42 am

Re: after update to 3.0.8, apostrophes are ’

Post by Bramster. » Tue Feb 08, 2011 12:49 pm

Thanks a lot Eric, gonna try it this afternoon.

Bramster.
Registered User
Posts: 151
Joined: Thu Mar 04, 2010 7:42 am

Re: after update to 3.0.8, apostrophes are ’

Post by Bramster. » Tue Feb 08, 2011 6:42 pm

Worked like a charm, thanks again Eric.

Does anyone have any idea what these should be ?

…

and

„

Bramster.
Registered User
Posts: 151
Joined: Thu Mar 04, 2010 7:42 am

Re: after update to 3.0.8, apostrophes are ’

Post by Bramster. » Wed Feb 09, 2011 7:56 pm

No one ?

Isn't there a list somewhere where one can loopup these things ?

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: after update to 3.0.8, apostrophes are ’

Post by D¡cky » Wed Feb 09, 2011 8:57 pm

There is no list that I know of. I made up my own when I came across this problem. Are those the only two characters you need to know?

Code: Select all

… is …
„ is  „
Have you hugged someone today?

Locked

Return to “[3.0.x] Support Forum”