Hi Jeremy,

>> P.S2 I store data in one table which has no default collation set only
>> UTF-8 charset. In
>> this table I can have data in different collations.

> Every table does have a default collation either you specify it or it
> comes from the default collation for your database or the server
> default.  You need to either:

> 1. set your table to use utf8_polish_ci

> or if you need more than one collation in your table

> 2. set the collation for the Polish columns to utf8_polish_ci.

> Otherwise you are probably using the default collation for utf8 which is
> either utf8_general_ci or utf8_unicode_ci I forget which.

> Collation _can_ be set for individual columns and it sounds like that is
> what you need to do.  This is also important because each column index
> is collation specific and you need your columns to be indexed for the
> right collation.

Ok, I thought that I will be misunderstood... 

I'll try to explain this in example below:

I have table

CREATE TABLE `product_descriptions` (
  `id_product_description` mediumint(8) unsigned NOT NULL auto_increment,
  `id_product` mediumint(8) unsigned NOT NULL default '0',
  `lang` varchar(2) default NULL,
  `text_data` text,
  PRIMARY KEY  (`id_product_description`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8


in column `text_data` i have all texts in all languages (pl, en, ru etc.) So the 
problem is that this column is meant to store every collation for this language but in 
UTF-8. Now, when I get records from this table I should give database some info that I 
will use i.e. 'utf_8_polish_ci' collation on whole page - I don't need to change it on 
whole page (I use PHP by the way)

This solution I use is very handy as when I need to add some language to my pages then 
I only add some info in application about what language this would be and... this 
should work. I can't change database structure on every language upgrade. Besides I 
would have for example 20 columns with different collations like:

text_data_pl
text_data_ru
text_data_ro
text_data_en
text_data_...

and this table is not the only one which stores information in different languages... 
So please consider this and please if you know tell me what collation_connection is 
for.

-- 
"Use the force - read the source"

Piotr Duszynski                          mailto:[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to