Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Encoding für Datenbank bzw Tabelle setzen

Empfohlene Antworten

Hallo Leutz,

ich will Daten von einer Textdatei in in eine mysql Datenbank importieren. Mir steht dazu allerding nur die Konsole zur Verfügung.

Ich hatte jetzt versucht die Textdatei, welche als utf8 abgespeicht ist, über den Befehlt " \. <filename> " zu importieren. Funktioniert auch spitze, nur leider geht wohl das encoding verloren. Auch wenn ich die Tabelle erst über das Script in der Textdatei erstelle und das Encoding dort direkt angebe.


CREATE TABLE `content` (

`id` CHAR(36) COLLATE utf8_general_ci NOT NULL DEFAULT '',

`xmlcontent` TEXT COLLATE utf8_general_ci,

`create` DATETIME DEFAULT NULL,

`lastmodi` DATETIME DEFAULT NULL,

PRIMARY KEY (`id`),

UNIQUE KEY `column1` (`id`)

)ENGINE=InnoDB

CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';


show variables like 'character%'


Liefert das hier:


character_set_client             : latin1

character_set_connection      : latin1

character_set_database        : utf8

character_set_filesystem       : binary

character_set_results            : latin1

character_set_server            : latin1

character_set_system           : utf8

character_set_dir                 : blabla..


Schaut eigentlich gut aus, oder :rolleyes: ?

Ich bin leider überhaupt nicht fit in der Konsole und hab keine Ahnung wie das Encoding für die Db, bzw für die Tabelle angeben kann. Ich vermute ausserdem, dass es evtl. am Import über die Konsole liegt.

Wenn Ihr mir helfen könnt würde ich mich freuen

Vielen Dank schon mal!

Gruß,

Rasta

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.