MySQL Forums
Forum List  »  Connector/ODBC

Re: MySQL ODBC 8.0 Unicode Driver and utf8 - solved
Posted by: Phil Loats
Date: August 17, 2021 06:06AM

>Can you try adding CHARSET=utf8mb4 to your connection string?
>By default the driver uses utf8, which is max length 3 bytes instead of 4 in utf8mb4.

Thank you for your reply. Solved!
Only changing the the CHARSET=utf8mb4 in the odbc.ini for the connection resolves the problem.

It doesn't completely make sense to me if the default is utf8 (instead of utf8mb4). The multi-byte characters in my string, \xC5\xA0 and \xC4\x8D, are only 2-bytes. Maybe something in my config is defaulting to latin1? I was guessing this was a setup problem as it is unlikely all muli-byte utf8 being broken wouldn't have been noticed. Many thanks again!

Options: ReplyQuote

Written By
Re: MySQL ODBC 8.0 Unicode Driver and utf8 - solved
August 17, 2021 06:06AM

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.