Mambo forums
Forum Home Register Forum Rules FAQ Search Today's Posts Mark Forums Read

Go Back   Mambo CMS Forum > Converting, Migrating & Upgrading Mambo > Moving to Mambo
 

utf-8 and Collation on phpmyadmin

This is a discussion on utf-8 and Collation on phpmyadmin within the Moving to Mambo forums for Mambo.

Reply
 
Thread Tools
Old 08-01-2008, 08:41 PM   #1
Matador
Mambo Supporter
 
Join Date: Aug 2007
Posts: 125
utf-8 and Collation on phpmyadmin

I've installed Mambo 4.6.3 and inserted content from Joomla! (just 4 tables), and although the install said utf-8 when I browse phpmyadmin I see that ALL the 38 tables have Collation set as "latin1_swedish_ci". The site is written in a non-english language.

So... is it bad?

Do I need to change all the tables to utf-8 (utf8_general_ci)?

How do I do it?

Thanks,

Last edited by Matador; 08-01-2008 at 08:47 PM.
Matador is offline   Reply With Quote
Old 08-01-2008, 09:17 PM   #2
neo_fox
Mambo Supporter
Moderators
 
neo_fox's Avatar
 
Join Date: Jun 2007
Location: /home/radek
Posts: 289
Re: utf-8 and Collation on phpmyadmin

Hi Matador,

Code:
ALTER TABLE table CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
unfortunately for every single table

Regards,
Neo
__________________
Sigsiu.NET - SOBI Development Team
Radek Suski
Internet: www.Sigsiu.NET / Online Shop: https://Shop.Sigsiu.NET / Support Center: http://Helpdesk.Sigsiu.NET
neo_fox is offline   Reply With Quote
Old 08-01-2008, 09:31 PM   #3
Matador
Mambo Supporter
 
Join Date: Aug 2007
Posts: 125
Re: utf-8 and Collation on phpmyadmin

Thanks.

What if the old content wasn't utf-8? Does it care?
Matador is offline   Reply With Quote
Old 08-01-2008, 09:44 PM   #4
neo_fox
Mambo Supporter
Moderators
 
neo_fox's Avatar
 
Join Date: Jun 2007
Location: /home/radek
Posts: 289
Re: utf-8 and Collation on phpmyadmin

I never tried but is should be converted: http://dev.mysql.com/doc/refman/5.0/...t-convert.html

Regards,
Neo
__________________
Sigsiu.NET - SOBI Development Team
Radek Suski
Internet: www.Sigsiu.NET / Online Shop: https://Shop.Sigsiu.NET / Support Center: http://Helpdesk.Sigsiu.NET
neo_fox is offline   Reply With Quote
Old 08-01-2008, 09:46 PM   #5
Matador
Mambo Supporter
 
Join Date: Aug 2007
Posts: 125
Re: utf-8 and Collation on phpmyadmin

Ouch! I get this error:

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci' at line 1
Matador is offline   Reply With Quote
Old 08-01-2008, 09:51 PM   #6
neo_fox
Mambo Supporter
Moderators
 
neo_fox's Avatar
 
Join Date: Jun 2007
Location: /home/radek
Posts: 289
Re: utf-8 and Collation on phpmyadmin

This
ALTER TABLE table CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; was of course just a placeholder for the real table name like: mos_bannerfinish, mos_categories, mos_comment, etc
__________________
Sigsiu.NET - SOBI Development Team
Radek Suski
Internet: www.Sigsiu.NET / Online Shop: https://Shop.Sigsiu.NET / Support Center: http://Helpdesk.Sigsiu.NET
neo_fox is offline   Reply With Quote
Old 08-01-2008, 09:51 PM   #7
Matador
Mambo Supporter
 
Join Date: Aug 2007
Posts: 125
Re: utf-8 and Collation on phpmyadmin

Sorry. I'm a moron. I didn't change the word "TABLE".
Matador is offline   Reply With Quote
Old 08-01-2008, 09:53 PM   #8
Matador
Mambo Supporter
 
Join Date: Aug 2007
Posts: 125
Re: utf-8 and Collation on phpmyadmin

Originally Posted by neo_fox View Post
I never tried but is should be converted: http://dev.mysql.com/doc/refman/5.0/...t-convert.html

Regards,
Neo
Do I convert/cast before the table change? or after?
Matador is offline   Reply With Quote
Old 09-01-2008, 12:57 AM   #9
Matador
Mambo Supporter
 
Join Date: Aug 2007
Posts: 125
Re: utf-8 and Collation on phpmyadmin

I've changed the tables but the SUM at the bottom keeps saying "latin1_swedish_ci", like the Database Collation.
Matador is offline   Reply With Quote
Old 09-01-2008, 11:04 AM   #10
andphe
Mambo Guru
MSC
Programming
Forum Admin
Super Moderators
 
andphe's Avatar
 
Join Date: Oct 2006
Location: Colombia
Posts: 4,012
Re: utf-8 and Collation on phpmyadmin

Just a clue on this one, the charset used for the mysql connection is determined by charset of your language package, but additionally Mambo is able to use the mysql convertion so you can have your language package in a charset (utf-8 by default) and your database in another charset, doesn't work your mambo in that way?
__________________
Andrés Felipe Vargas
http://www.mambo-es.net, únete a la comunidad en español de Mambo
http://tinyurl.com/mambo-webchat Mambo Web Chat
andphe is offline   Reply With Quote
Reply

Bookmarks

Tags
quang

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 07:53 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Mambo Foundation, Inc © 2000 - 2008 All rights reserved. Mambo is Free Software released under the GNU/GPL License.

Managed Servers by DedicatedNOW