Nochmal utf8
- From: Mathias Fiedler <letters@xxxxxxxxxxx>
- Date: Mon, 12 Jun 2006 15:11:06 +0200
Hallo, da bin ich schon wieder.
Ich hatte mich leider zu früh gefreut. Mit Varchar klappt zwar alles, aber
ich habe zu wenig Zeichen zur Verfügung. Kein Problem, hab ich mir gedacht,
wird das Feld eben wieder Longtext. Es gibt ja die Änderung des character
sets nach utf8. Aber leider falsch gedacht.
Folgendermaßen erstellte Tabelle funktioniert prima. Nur das die Spalte utf
zu wenig Zeichen besitzt.
CREATE TABLE `test_utf8` (
`id` INT( 4 ) NOT NULL AUTO_INCREMENT ,
`utf` Varchar(255) CHARACTER SET utf8 NOT NULL ,
PRIMARY KEY ( `id` )
)
Hier klappt dann auch das Ein- und Auslesen.
Folgende Eingabe funktioniert aber nicht. Hier meckert mysql schon beim
Erstellen der Tabelle. Warum?
CREATE TABLE `test_utf8` (
`id` INT( 4 ) NOT NULL AUTO_INCREMENT ,
`utf` LONGTEXT CHARACTER SET utf8 NOT NULL ,
PRIMARY KEY ( `id` )
)
Was ist an zweiter Syntax falsch? Oder anders, wenn ich longtext nicht auf
utf-8 bekomme, was muß ich dann nehmen?
Ich spring gleich im Dreieck. Kaum denkt man mal, es funktioniert, kommt
der nächste Stein ins rollen.
Fehlermeldung:
#1064 - You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'character set utf8 NOT NULL ,
PRIMARY KEY ( `id` )
)' at lin
.
- Follow-Ups:
- Re: Nochmal utf8
- From: Christian Kirsch
- Re: Nochmal utf8
- From: Mathias Fiedler
- Re: Nochmal utf8
- Prev by Date: Re: load data infile
- Next by Date: Re: Ex- und Import von Mysql nach Excel mit Hilfe einer Datei im CSV-Format
- Previous by thread: load data infile
- Next by thread: Re: Nochmal utf8
- Index(es):
Relevant Pages
|