OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Re[2]: 8bit symbols in rcpt to:

From: Leandro Santi (lesantigmail.com)
Date: Fri Jun 23 2006 - 11:05:41 CDT


On 6/23/06, Anton Yuzhaninov <citrinrambler-co.ru> wrote:

> client's character set is latin1 and database also in latin1, but
> address in rcpt to: was in form
> <{some_utf-8_string}valuid_userexamle.com>

Are you using an old mysql-4.1? Older versions don't seem to
handle trivial multi-charset queries:

mysql-4.1.8> SELECT COLLATION(_utf8 0x26), COLLATION('&');
+-----------------------+-------------------+
| COLLATION(_utf8 0x26) | COLLATION('&') |
+-----------------------+-------------------+
| utf8_general_ci | latin1_swedish_ci |
+-----------------------+-------------------+

mysql-4.1.8> SELECT _utf8 0x26 = _latin1 '&';
ERROR 1267 (HY000): Illegal mix of collations
(utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for
operation '='

mysql-4.1.19> SELECT _utf8 0x26 = _latin1 '&';
+--------------------------+
| _utf8 0x26 = _latin1 '&' |
+--------------------------+
| 1 |
+--------------------------+
1 row in set (0.03 sec)

Please provide the output of show variables like '%char%', show
variables like '%collation%', the output of show create table, and
the actual SQL queries. Full information.

What happens if "= binary" is replaced with "= _latin1" in your
SQL queries? It should fail, I think.

Leandro