Golfreeze.packetlove.com: Life style of Golfreeze Canon400D Family kammtan.com Jazz Freebsd Unix Linux System Admin guitar Music

All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server => all application on unix knowledges by golfreeze => Topic started by: golfreeze on มิถุนายน 15, 2018, 11:00:46 PM

Title: ANSI vs Unicode on mysql-obdc
Post by: golfreeze on มิถุนายน 15, 2018, 11:00:46 PM
Connector/ODBC offers the flexibility to handle data using any character set through its Unicode-enabled driver,
or the maximum raw speed for a more limited range of character sets through its ANSI driver

https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-installation.html
Title: Re: ANSI vs Unicode on mysql-obdc
Post by: golfreeze on มิถุนายน 16, 2018, 02:14:05 PM
Firstly I should say that I don't use MySQL but I do know about ODBC Drivers. In ODBC there are different APIs for unicode and ansi.

The ansi APIs end in A and
the unicode APIs end in W (e.g., SQLPrepareA and SQLPrepareW).

The ansi APIs accept bytes/octets for character strings and hence can only handle chrs 0-255.

The unicode APIs accept SQLWCHARs which are 2 byte UCS-2 encoded unicode codepoints (newer MS SQL Server versions can handle UTF16 encoded strings) and so can handle approximately the first 65000 codepoints in unicode.

So if you need to store unicode data you have no choice which driver to use.