[MySQL 4.1] Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • [MySQL 4.1] Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general

    Einfache Abfrage :
    PHP-Code:
     SELECT concat_ws(' ',col1,col2 from table 
    resultiert in Fehler
    Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) in concat_ws
    und zwar bei Ausführung in Shell und Skript (PHP) nicht jedoch in PHPmyAdmin

    Standard Charsets für Database / Table / und Columns gestzt auf utf8

    (in Shell ausgeführt : ALTER DATABASE DEFAULT CHARSET utf8 ....)

    phpMyAdmin zeigt Kollationen für Spalten als "utf8_general_ci"

    Wie gesagt in phpMyAdmin gibt keine Fehlermeldung, bei Skriptausführung und shell-eingabe (ssh) jedoch oibige Meldung

    der Fehler tritt auch auf bei :
    PHP-Code:
    select concat(strasse,' ',strasse2
    nicht jedoch bei
    PHP-Code:
    select concat(strasse,strasse2
    Das heist es geht um das "' '" Whitespace - welches ich jedoch benötige

    Ideen? Für Hilfe bin ich dankbar


    Shell-Output
    Code:
     
    mysql> select concat(strasse,strasse2) from kunden;
    +-----------------------------------+
    | concat(strasse,strasse2)     |
    +-----------------------------------+
    | tester. 37tester. 37             |
    | Bernhard-Göring-Str.152Häußle |
    | Teststr 15                            |
    | Hausbootweg 14                 |
    | Hausbootweg 14                 |
    | Mehlhhorn str. 12                |
    +-----------------------------------+
    6 rows in set (0,00 sec)
    
    mysql> select concat(strasse,' ',strasse2) from kunden;
    ERROR 1270 (HY000): Illegal mix of collations 
    (utf8_general_ci,IMPLICIT), (latin1_swedish_ci,COERCIBLE), 
    (utf8_general_ci,IMPLICIT) for operation 'concat'
    Zuletzt geändert von chansel0049; 22.06.2005, 14:37.
    chansel0049
    ----------------------------------------------------
    if you've reached the bottomline - dig further!
    Übersetzer gesucht? http://www.babelport.com

  • #2
    OK Problem gelöst

    in der my.cnf noch eingefügt :

    default-character-set= utf8
    default-collation = utf8_general_ci
    chansel0049
    ----------------------------------------------------
    if you've reached the bottomline - dig further!
    Übersetzer gesucht? http://www.babelport.com

    Kommentar

    Lädt...
    X