phpbar.de logo

Mailinglisten-Archive

Re: Umlaute in MySQL
Archiv Mailingliste mysql-de

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Umlaute in MySQL



Hallo,

ist ein Abschnitt aus der Doku zu MySQL, ich hoffe er beantwortet die Frage.
Praktische Erfahrung habe ich aber nicht.

Gruß Michael

10.1.1 The character set used for data and sorting
By default, MySQL uses the ISO-8859-1 (Latin1) character set. This is the
character set used in the USA and western Europe.

The character set determines what characters are allowed in names and how
things are sorted by the ORDER BY and GROUP BY clauses of the SELECT
statement.

You can change the character set with the --default-character-set option
when you start the server. The character sets available depend on
the --with-charset=charset option to configure, and the character set
configuration files listed in `SHAREDIR/charsets/Index'. See section 4.7.1
Quick installation overview.

When a client connects to a MySQL server, the server sends the default
character set in use to the client. The client will switch to use this
character set for this connection.

One should use mysql_real_escape_string() when escaping strings for a SQL
query. mysql_real_escape_string() is identical to the old
mysql_escape_string() function, except that it takes the MYSQL connection
handle as the first parameter.

If the client is compiled with different paths than where the server is
installed and the user that configured MySQL didn't included all character
sets in the MySQL binary one must specify for the client where it can find
the additional character sets it will need if the server runs with a
different character set than the client.

On can specify this by putting in a MySQL option file:

[client]
default-set-dir=/usr/local/mysql/share/mysql/charsets

where the path points to where the dynamic MySQL character sets are stored.

One can force the client to use specific character set by specifying:

[client]
default-character-set=character-set-name

but normally this is never needed.


----- Original Message -----
From: "Matthias Lampert" <ml_(at)_sph.de>
To: "Mysql-List (E-Mail)" <mysql-de_(at)_lists.4t2.com>
Sent: Wednesday, January 10, 2001 9:41 AM
Subject: Umlaute in MySQL


Hi!

Ich bin auf anderer Stelle auf ein Problem gestoßen, das mich
ein bisschen verunsichert hat: Weiß jemand von Euch, ob und
inwieweit MySQL den ISO-8859-1-Code in der Aufnahme und der
Verarbeitung der übergebenen Daten berücksichtigt?

Besonders interessant ist natürlich der Sortieralgorithmus:
Bei reiner ASCII-Sortierung kommt ,,Verzeichnis`` (z==0x7A)
vor ,,Veränderung`` (ä=0xE4)...

mfG.,

--

Matthias Lampert, Hamburg

---
*** Weitere Infos zur Mailingliste und MySQL unter http://www.4t2.com/mysql



---
*** Weitere Infos zur Mailingliste und MySQL unter http://www.4t2.com/mysql 


Home | Main Index | Thread Index

php::bar PHP Wiki   -   Listenarchive