Re: Unknown OS character set
Jim Knuth <jk@jkart.de> writes:
> am 26.09.12 00:54 schrieb Peter Wiersig <friese@london087.server4you.de>:
>> Heisst ja nicht das nicht einzelne Pakete aus einer anderen Quelle
>> stammen koennen. Zeig deswegen bitte
>> % dpkg -S /usr/bin/mysqladmin
>
> mysql-client-5.5: /usr/bin/mysqladmin
Das sollte kein Paket aus squeeze sein, zeig mal
% apt-cache policy mysql-client-5.5
Die Oracle Release-Notes zu 5.5 weisen Änderungen im Bereich
character-sets auf:
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-0.html
"""
Previously, in the absence of other information, the MySQL client
programs mysql, mysqladmin, mysqlcheck, mysqlimport, and mysqlshow used
the compiled-in default character set, usually latin1.
Now these clients can autodetect which character set to use based on the
operating system setting, such as the value of the LANG or LC_ALL locale
environment language on Unix system or the code page setting on Windows
systems. For systems on which the locale is available from the OS, the
client uses it to set the default character set rather than using the
compiled-in default. Thus, users can configure the locale in their
environment for use by MySQL clients. For example, setting LANG to
ru_RU.KOI8-R causes the koi8r character set to be used. The OS character
set is mapped to the closest MySQL character set if there is no exact
match. If the client does not support the matching character set, it
uses the compiled-in default. (For example, ucs2 is not supported as a
connection character set.)
An implication of this change is that if your environment is configured
to use a non-latin1 locale, MySQL client programs will use a different
connection character set than previously, as though you had issued an
implicit SET NAMES statement. If the previous behavior is required,
start the client with the --default-character-set=latin1 option.
Third-party applications that wish to use character set autodetection
based on the OS setting can use the following mysql_options() call
before connecting to the server:
mysql_options(mysql,
MYSQL_SET_CHARSET_NAME,
MYSQL_AUTODETECT_CHARSET_NAME);
See Section 10.1.4, “Connection Character Sets and Collations”.
"""
Den Parameter --default-character-set=latin1 kannst du als
default-character-set=latin1 in die Section [client] der Datei
/etc/mysql/my.cnf eintragen, wenn ich mich richtig erinnere. Sollte dann
bei den genannten Kommandos mysql, mysqladmin, mysqlcheck, mysqlimport,
und mysqlshow Auswirkungen haben.
Dateien unter /usr/share/doc/mysql-client-5.5, die hilfreich sein
koennten: (Dateiliste anhand meiner lokalen Dateien vom client-5.1)
NEWS.Debian.gz (gibt's nach packages.d.o nicht mehr)
README.Debian
changelog.Debian.gz
README
Peter
Reply to: