1.2.9 Collation for Dummies ;-)

Discuss phpwcms here, please do not post support requests, bug reports, or feature requests! Non-phpwcms questions, discussion goes in General Chat!
Post Reply
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

1.2.9 Collation for Dummies ;-)

Post by StudioZ »

I just read Oliver's post and notes about the db collation options
http://www.phpwcms.de/forum/viewtopic.php?t=13890

I must admit I am a bit puzzled about all this collation stuff :roll:

Right now I am working on a new 1.2.9 site.
All is running fine.
Here are the collation confs I have in there:

In my CONFS I have:
$phpwcms['db_charset'] = 'latin1';
$phpwcms['db_collation'] = 'latin1_swedish_ci';
$phpwcms['db_version'] = 40121;

In PhpMyAdmin:
I can see that all the tables have their collation set to this: latin1_swedish_ci
just like all the other programs' dbs I have in there running

Existential Question:
Does it makes sense that someday at some point and for a reason I would not yet suspect, I would then have to change or swap all the tables collation settings from latin1_swedish_ci to utf8_unicode_ci

Important (to me):
What would then be the SQL command to batch swap all the tables collations from latin1_swedish_ci to utf8_unicode_ci ?
:?:

Just a matter of starting this site the good way before too many texts get published.

Cheers,

Yves
Sincere PhpWCMS Evangelist
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Was this a dummy question? :oops: :lol:
Am I the only one around here puzzled about collation ? :roll:
I really need to push away that cloud over my head :? :wink:

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
Oliver Georgi
Site Admin
Posts: 9940
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

For the languages you speak ... there is no need to switch to UTF-8. So don't think about.

But it's very transparent in MySQL now - as long as you set correct phpwcms db connection charset/collation settings there is NO need to convert db tables too. MySQL will do it for you on the fly then.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Yé !!! :) :) :)
No more clouds 8) 8) 8)
Thank you Oliver for taking the time :wink:

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
Oliver Georgi
Site Admin
Posts: 9940
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

One note: on the fly just means charset conversion for current db connection - but NOT converting db tables.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Oliver,

What I understand is that in my context,
where I mostly work with French and English
and Spanish (maybe some day?), I am allright with these settings:
$phpwcms['db_charset'] = 'latin1';
$phpwcms['db_collation'] = 'latin1_swedish_ci';

... and if ever some day... a client ask me for a Japan and English Web Site,
then... I will have to use these instead:
$phpwcms['db_charset'] = 'utf8';
$phpwcms['db_collation'] = 'utf8_general_ci';
In this case, I suppose I will have to make sure all the tables are set to utf8_general_ci

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
Oliver Georgi
Site Admin
Posts: 9940
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

yes. that's right! Good boy :)

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

doing my best :wink: :P
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Post Reply