MySQL Forums
Forum List  »  Connector/ODBC

Re: MySQL ODBC 8.0 Unicode Driver and utf8
Posted by: Phil Loats
Date: August 16, 2021 05:29PM

Thank you for looking.

>> I can confirm the data in the specific column is encoded as utf8
>Please show us the test you used to confirm this.
Here is the output from several commands:

'echo "use mydata;select hex(CN) from USER;" | mysql -u user1 -p' ->
hex(CN)
557365723120C5A07661C48D
<friendly encoded as \x55\x73\x65\x72\x31\x20\xC5\xA0\x76\x61\xC4\x8D (User1 Švač)>

'echo "use mydata;select CN from USER;" | mysql -u user1 -p' ->
CN
User1 Švač

'echo "select hex(CN) from USER;" | isql mydata user1 password ->
| hex(CN)
| 557365723120C5A07661C48D

'echo "select CN from USER;" | isql mydata user1 password ->
} CN
| User1 ?va?

'printf "set character_sset_results=binary;\nselect CN from USER;\nquit\n" | isql mydata user1 password ->
| CN
| User1 Švač

>Is your app using Connector/ODBC using utf8 or utf8mb4?
I believe we are using utf8mb4. e.g.
'SELECT character_set_name FROM information_schema.`COLUMNS` WHERE table_name = "USER" AND column_name = "CN";' ->
+-----------------------------------------------------------------+
| CHARACTER_SET_NAME |
+-----------------------------------------------------------------+
| utf8mb4 |
+-----------------------------------------------------------------+

Also /proc/<nnnn>/maps shows /usr/lib64/libmyodbc8w.so has been loaded.

Again, If I only swap the Driver in odbc.ini from libmyodbc8w.so to libmaodbc.so, I do not see any problems.

>And let's see some the values you are seeing misdisplayed, and
Values provided above.

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL ODBC 8.0 Unicode Driver and utf8
August 16, 2021 05:29PM


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.