Page 1 of 1

1.2.9 Collation for Dummies ;-)

Posted: Tue 27. Feb 2007, 05:38
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

Posted: Wed 28. Feb 2007, 03:29
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

Posted: Wed 28. Feb 2007, 15:02
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

Posted: Wed 28. Feb 2007, 15:23
by StudioZ
YĆ© !!! :) :) :)
No more clouds 8) 8) 8)
Thank you Oliver for taking the time :wink:

Cheers,

Yves

Posted: Wed 28. Feb 2007, 15:49
by Oliver Georgi
One note: on the fly just means charset conversion for current db connection - but NOT converting db tables.

Oliver

Posted: Wed 28. Feb 2007, 20:12
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

Posted: Wed 28. Feb 2007, 20:31
by Oliver Georgi
yes. that's right! Good boy :)

Oliver

Posted: Wed 28. Feb 2007, 20:33
by StudioZ
doing my best :wink: :P