Inserting umlauts from Windows shell (Cygwin)
Posted by: Karsten Wutzke
Date: July 07, 2010 08:01AM

Hello,

I have a problem inserting strings into VARCHAR columns. The DB character set is utf8_general_ci, so that doesn't seem to be the problem. MySQL default-character-set is utf_general_ci.

A typical insert is the following:

INSERT INTO contact VALUES (4, 12629, 'Max-Planck-Straße ?', NULL, NULL);

If I don't adjust any MySQL settings, I get errors like:

ERROR 1366 (HY000) at line 733: Incorrect string value: '\xDFe ?' for column 'street' at row 1

I then googled a little and found

http://www.miracee.org/2009/03/30/encoding-handling-mysql-cli-5858398/

In the script to be executed, I added

SET NAMES cp850;

...

Now the scripts runs cleanly, however, all Umlauts shown in phpMyAdmin and the CLI don't show the correct letters. In Firefox (set to Unicode) it just shows block-like characters for ß, ä, ö, ü, Ä, Ö, Ü...:

ß: Bergstra▀e
Ä: ?
ä: Grõfenhausen
Ö: ?
ö: D÷rfler
Ü: ▄SC Wald-Michelbach
ü: M³hltal

What is it I have to change?

Karsten

Options: ReplyQuote


Subject
Views
Written By
Posted
Inserting umlauts from Windows shell (Cygwin)
3749
July 07, 2010 08:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.