Package: libmyodbc Version: 5.1.10-3 Severity: normal Bug originally hit in my role of LibreOffice/Base developer, treating issues connecting to MySQL over ODBC.
The problem is that column names in result sets are *not* transcoded to the value of MyODBC's charset option, but (apparently) just copied byte-for-byte as what the MySQL server gives. Because MyODBC sets the server variable character_set_results to NULL, that is the value of character_set_system, which is usually (always?) utf8. Precise example: Make an entry in .odbc.ini like: [MySQL test] Driver = MySQL Server = localhost Database = test charset = latin1 (and create the test database in MySQL) Open a ISO8859-1 shell; for example: $ export LC_ALL=fr_LU # or any supported/enabled ISO8859-1 locale $ xterm ### switch to the new xterm $ isql 'MySQL test' user password SQL> CREATE TABLE élément ( numÉlément INT NOT NULL PRIMARY KEY ); SQL> SHOW TABLES; +-----------------------------------------------------------------+ | Tables_in_test | +-----------------------------------------------------------------+ | élément | +-----------------------------------------------------------------+ SQLRowCount returns 1 1 rows fetched SQL> SELECT * FROM élément; +-------------+ | numÃlément| +-------------+ +-------------+ SQLRowCount returns 0 SQL> SELECT numÉlément FROM élément; +-------------+ | numÃlément| +-------------+ +-------------+ SQLRowCount returns 0 SQL> SELECT numÉlément AS numéro_de_l_élément FROM élément; +-----------------------+ | numéro_de_l_élément| +-----------------------+ +-----------------------+ SQLRowCount returns 0 SQL> Note how: 1) The table name appears correctly in output of SHOW TABLES; (MyODBC presumably does the transcoding there) 2) The column name is parsed correctly from the SQL command 3) The column name appears wrongly in the result. (MyODBC should do transcoding, but does not. Or alternatively, MyODBC should set character_set_results to the value of its charset parameter, and not do any transcoding itself.) -- System Information: Debian Release: 7.1 APT prefers stable APT policy: (500, 'stable'), (400, 'testing'), (300, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libmyodbc:amd64 depends on: ii debconf [debconf-2.0] 1.5.49 ii libc6 2.17-92 ii libmysqlclient18 5.5.31+dfsg-0+wheezy1 ii odbcinst1debian2 2.2.14p2-5 ii zlib1g 1:1.2.7.dfsg-13 Versions of packages libmyodbc:amd64 recommends: ii libodbc1 2.2.14p2-5 libmyodbc:amd64 suggests no packages. -- debconf information: * libmyodbc/addtoodbc: true -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org