Re: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

2005-08-25 Thread Florian Burkart
Hey Gleb,
thanks for taking your time!

php.ini:

; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header.  To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
default_charset = "utf-8"


mysql version:
mysql  Ver 14.7 Distrib 4.1.13, for pc-linux-gnu (i686) using readline 5.0

php version:
PHP 4.4.0 (cli) (built: Aug 23 2005 14:55:11)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

apache2:
Server version: Apache/2.0.54
Server built:   Aug 24 2005 13:41:09
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/sbin/suexec2"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf"



The text in the browser coming from PHP is as well as the plain HTML utf-8 
encoded, it is only the mysql-queries in php which return iso - besides the 
original problem that the query sends strings as iso...

:/

Thanks again,
Florian

On Thu, 25 Aug 2005 10:58:07 +0300
Gleb Paharenko <[EMAIL PROTECTED]> wrote:

> Hello.
> 
> What is the value of the default_charset variable in your php.ini file?
> What version of MySQL do you use?
> 
> 
> 
> Florian Burkart <[EMAIL PROTECTED]> wrote:
> > What might help as well is another problem I have:
> > 
> > Somehow, the data I am getting out of mysql and php and is being served by =
> > apache is still in iso format, and not utf8. Which leads to bad displaying =
> > (unless i switch back to iso in the browser, but then the html stuff in utf=
> > 8 gets strange (which is served correctly in utf8).=20
> > 
> > Is that related? If not, still someone with hints on it?
> > 
> > 
> > On Wed, 24 Aug 2005 20:55:21 +0300
> > Gleb Paharenko <[EMAIL PROTECTED]> wrote:
> > 
> 
> 
> -- 
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.NET http://www.ensita.net/
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
><___/   www.mysql.com
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
> 


-- 
Zur Zeit befinde ich mich hinter einer Firewall welche das versenden von 
E-Mails über die Adresse [EMAIL PROTECTED] verhindert. Ihr erhaltet Antworten 
auf E-Mails an [EMAIL PROTECTED] daher ebenfalls von [EMAIL PROTECTED] Es macht 
keinen Unterschied welche der beiden Adressen ihr anschreibt.

Meine alte Handynummer +49-151-11616247 ist gekündigt. Hier in Guadalajara, 
Mexico, erreicht ihr mich unter der +52-3310650934.

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



Re: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

2005-08-24 Thread Florian Burkart
What might help as well is another problem I have:

Somehow, the data I am getting out of mysql and php and is being served by 
apache is still in iso format, and not utf8. Which leads to bad displaying 
(unless i switch back to iso in the browser, but then the html stuff in utf8 
gets strange (which is served correctly in utf8). 

Is that related? If not, still someone with hints on it?


On Wed, 24 Aug 2005 20:55:21 +0300
Gleb Paharenko <[EMAIL PROTECTED]> wrote:

> Hello.
> 
> Your character_set_xxx variables is ok. The problem could be in
> the table definition. Send the output of
>   SHOW CREATE TABLE tbl_gruppen;
> 
> Florian Burkart <[EMAIL PROTECTED]> wrote:
> > Hey everyone,
> > 
> > can't figure this one out, might be easy for one of you.
> > 
> > 
> > 
> > This is the query:
> > (SELECT 'Neue Gruppe' AS gruppenstring, '-1' AS gruppe_id)
> > UNION ALL
> > (SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
> > FROM tbl_gruppen
> > ORDER BY gruppe);
> > 
> > 
> > 
> > This error message is returned on the php website:
> > Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and 
> > (utf8_general_ci,IMPLICIT) for operation 'UNION'
> > 
> > 
> > 
> > There is no error message (query executes successfully) in phpmyadmin or 
> > when connecting by mysql.
> > 
> > 
> > 
> > Following query always executes successfully (no long term solution though):
> > (SELECT utf8_'Neue Gruppe' AS gruppenstring, utf8_'-1' AS gruppe_id)
> > UNION ALL
> > (SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
> > FROM tbl_gruppen
> > ORDER BY gruppe);
> > 
> > 
> > 
> > This is the output of
> > mysql> show variables like "%character%"; show variables like "%collation%";
> > +--++
> > | Variable_name| Value  |
> > +--++
> > | character_set_client | utf8   |
> > | character_set_connection | utf8   |
> > | character_set_database   | utf8   |
> > | character_set_results| utf8   |
> > | character_set_server | utf8   |
> > | character_set_system | utf8   |
> > | character_sets_dir   | /usr/share/mysql/charsets/ |
> > +--++
> > 7 rows in set (0.00 sec)
> > 
> > +--+-+
> > | Variable_name| Value   |
> > +--+-+
> > | collation_connection | utf8_general_ci |
> > | collation_database   | utf8_general_ci |
> > | collation_server | utf8_general_ci |
> > +--+-+
> > 3 rows in set (0.00 sec)
> > 
> > 
> > 
> > This is my.cnf
> > ...
> > [mysql]
> > character-sets-dir=/usr/share/mysql/charsets
> > default-character-set=utf8
> > 
> > [mysqladmin]
> > character-sets-dir=/usr/share/mysql/charsets
> > default-character-set=utf8
> > 
> > [mysqlcheck]
> > character-sets-dir=/usr/share/mysql/charsets
> > default-character-set=utf8
> > 
> > [mysqldump]
> > character-sets-dir=/usr/share/mysql/charsets
> > default-character-set=utf8
> > 
> > [mysqlimport]
> > character-sets-dir=/usr/share/mysql/charsets
> > default-character-set=utf8
> > 
> > [mysqlshow]
> > character-sets-dir=/usr/share/mysql/charsets
> > default-character-set=utf8
> > 
> > [myisamchk]
> > character-sets-dir=/usr/share/mysql/charsets
> > 
> > [myisampack]
> > character-sets-dir=/usr/share/mysql/charsets
> > 
> > # use [safe_mysqld] with mysql-3
> > [mysqld_safe]
> > err-log = /var/log/mysql/mysql.err
> > 
> > # add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations.
> > [mysqld]
> > character-set-server= utf8
> > default-character-set   = utf8
> > ...
> > 
> > 
> > 
> > Probably easy, but help please :)
> > Florian
> > 
> 
> 
> -- 
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.NET http://www.ensita.net/
>__  ___ ___   __
&

Re: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

2005-08-24 Thread Florian Burkart
mysql> show create table tbl_gruppen;
+-++
| Table   | Create Table



   |
+-++
| tbl_gruppen | CREATE TABLE `tbl_gruppen` (
  `gruppe_id` smallint(4) unsigned NOT NULL auto_increment,
  `gruppe` varchar(50) NOT NULL default '',
  `kommentar` varchar(255) NOT NULL default '',
  `geändert` timestamp NOT NULL default CURRENT_TIMESTAMP on update 
CURRENT_TIMESTAMP,
  PRIMARY KEY  (`gruppe_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8  |
+-++
1 row in set (0.00 sec)


On Wed, 24 Aug 2005 20:55:21 +0300
Gleb Paharenko <[EMAIL PROTECTED]> wrote:

> Hello.
> 
> Your character_set_xxx variables is ok. The problem could be in
> the table definition. Send the output of
>   SHOW CREATE TABLE tbl_gruppen;
> 
> Florian Burkart <[EMAIL PROTECTED]> wrote:
> > Hey everyone,
> > 
> > can't figure this one out, might be easy for one of you.
> > 
> > 
> > 
> > This is the query:
> > (SELECT 'Neue Gruppe' AS gruppenstring, '-1' AS gruppe_id)
> > UNION ALL
> > (SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
> > FROM tbl_gruppen
> > ORDER BY gruppe);
> > 
> > 
> > 
> > This error message is returned on the php website:
> > Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and 
> > (utf8_general_ci,IMPLICIT) for operation 'UNION'
> > 
> > 
> > 
> > There is no error message (query executes successfully) in phpmyadmin or 
> > when connecting by mysql.
> > 
> > 
> > 
> > Following query always executes successfully (no long term solution though):
> > (SELECT utf8_'Neue Gruppe' AS gruppenstring, utf8_'-1' AS gruppe_id)
> > UNION ALL
> > (SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
> > FROM tbl_gruppen
> > ORDER BY gruppe);
> > 
> > 
> > 
> > This is the output of
> > mysql> show variables like "%character%"; show variables like "%collation%";
> > +--++
> > | Variable_name| Value  |
> > +--++
> > | character_set_client | utf8   |
> > | character_set_connection | utf8   |
> > | character_set_database   | utf8   |
> > | character_set_results| utf8   |
> > | character_set_server | utf8   |
> > | character_set_system | utf8   |
> > | character_sets_dir   | /usr/share/mysql/charsets/ |
> > +--++
> > 7 rows in set (0.00 sec)
> > 
> > +--+-+
> > | Variable_name| Value   |
> > +--+-+
> > | collation_connection | utf8_general_ci |
> > | collation_database   | utf8_general_ci |
> > | collation_server | utf8_general_ci |
> > +--+-+
> > 3 rows in set (0.00 sec)
> > 
> > 
> > 
> > This is my.cnf
> > ...
> > [mysql]
> > character-sets-dir=/usr/share/mysql/charsets
> > default-character-set=utf8
> > 
> > [mysqladmin]
> > 

Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

2005-08-24 Thread Florian Burkart
Hey everyone,

can't figure this one out, might be easy for one of you.



This is the query:
(SELECT 'Neue Gruppe' AS gruppenstring, '-1' AS gruppe_id)
UNION ALL
(SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
FROM tbl_gruppen
ORDER BY gruppe);



This error message is returned on the php website:
Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and 
(utf8_general_ci,IMPLICIT) for operation 'UNION'



There is no error message (query executes successfully) in phpmyadmin or when 
connecting by mysql.



Following query always executes successfully (no long term solution though):
(SELECT utf8_'Neue Gruppe' AS gruppenstring, utf8_'-1' AS gruppe_id)
UNION ALL
(SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
FROM tbl_gruppen
ORDER BY gruppe);



This is the output of
mysql> show variables like "%character%"; show variables like "%collation%";
+--++
| Variable_name| Value  |
+--++
| character_set_client | utf8   |
| character_set_connection | utf8   |
| character_set_database   | utf8   |
| character_set_results| utf8   |
| character_set_server | utf8   |
| character_set_system | utf8   |
| character_sets_dir   | /usr/share/mysql/charsets/ |
+--++
7 rows in set (0.00 sec)

+--+-+
| Variable_name| Value   |
+--+-+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_general_ci |
| collation_server | utf8_general_ci |
+--+-+
3 rows in set (0.00 sec)



This is my.cnf
...
[mysql]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqladmin]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlcheck]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqldump]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlimport]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlshow]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[myisamchk]
character-sets-dir=/usr/share/mysql/charsets

[myisampack]
character-sets-dir=/usr/share/mysql/charsets

# use [safe_mysqld] with mysql-3
[mysqld_safe]
err-log = /var/log/mysql/mysql.err

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations.
[mysqld]
character-set-server= utf8
default-character-set   = utf8
...



Probably easy, but help please :)
Florian

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



Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

2005-08-24 Thread Florian Burkart
Hey everyone,

can't figure this one out, might be easy for one of you.



This is the query:
(SELECT 'Neue Gruppe' AS gruppenstring, '-1' AS gruppe_id)
UNION ALL
(SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
FROM tbl_gruppen
ORDER BY gruppe);



This error message is returned on the php website:
Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and 
(utf8_general_ci,IMPLICIT) for operation 'UNION'



There is no error message (query executes successfully) in phpmyadmin or when 
connecting by mysql.



Following query always executes successfully (no long term solution though):
(SELECT utf8_'Neue Gruppe' AS gruppenstring, utf8_'-1' AS gruppe_id)
UNION ALL
(SELECT CONCAT( gruppe, ' (', kommentar, ')' ) AS gruppenstring, gruppe_id
FROM tbl_gruppen
ORDER BY gruppe);



This is the output of
mysql> show variables like "%character%"; show variables like "%collation%";
+--++
| Variable_name| Value  |
+--++
| character_set_client | utf8   |
| character_set_connection | utf8   |
| character_set_database   | utf8   |
| character_set_results| utf8   |
| character_set_server | utf8   |
| character_set_system | utf8   |
| character_sets_dir   | /usr/share/mysql/charsets/ |
+--++
7 rows in set (0.00 sec)

+--+-+
| Variable_name| Value   |
+--+-+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_general_ci |
| collation_server | utf8_general_ci |
+--+-+
3 rows in set (0.00 sec)



This is my.cnf
...
[mysql]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqladmin]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlcheck]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqldump]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlimport]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlshow]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[myisamchk]
character-sets-dir=/usr/share/mysql/charsets

[myisampack]
character-sets-dir=/usr/share/mysql/charsets

# use [safe_mysqld] with mysql-3
[mysqld_safe]
err-log = /var/log/mysql/mysql.err

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations.
[mysqld]
character-set-server= utf8
default-character-set   = utf8
...



Probably easy, but help please :)
Florian

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