MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Piotr Duszynski Date:September 28 2004 8:38am
Subject:Different default collation in each connection
View as plain text  
Hi,

I have a problem setting default collation for each connection. I have multilanguage site
and I don't want to add COLLATE statement to every SQL - I could set it once during PHP
startup and forget about it... But there's a problem.

I tried to do 

SET names 'utf-8';
SET collation_connection = 'utf8_polish_ci';

and I think it should set collation in this connection to default 'utf8_polish_ci'.
Because depending on what user language will choose I can set i.e. 'utf_8_romanian_ci'.

So this does not work. When i use SQLs that search smth with LIKE I get no results
entering polish national char in different case than it is in DB.

Any suggestions? Please help as I don't want to add to every SQL COLLATE statment because
it's not even possible - many of theese SQLs are generated automagically...


P.S. I use MySQL 4.1.4 on Windows XP Home machine.  
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.

-- 
"Use the force - read the source"

Piotr Duszynski                          mailto:dooshek@stripped

Thread
Different default collation in each connectionPiotr Duszynski28 Sep
Re: Different default collation in each connectionJeremy March29 Sep
  • Re[2]: Different default collation in each connectionPiotr Duszynski29 Sep
Re: Different default collation in each connectionJeremy March30 Sep