On choosing Data Source under ODBC (64-Bit) on Windows, i get two available options of MySQL Database:

MySQL ODBC 5.3 ANSI Driver

MySQL ODBC 5.3 Unicode Driver

What are the difference between these two?

解决方案

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.

I would not let the comments on speed from Carnangel put you off using the unicode driver and in any case his comments do not include any facts. He may be referring to:

If you store unicode data in MySQL it will be UTF-8 encoded and transferred over your network as UTF-8. At the client end the ODBC driver will have to convert the UTF-8 encoded data into UCS-2 as this is what ODBC needs. Obviously the reverse applies.

If you write an ANSI ODBC application (that is one which uses the ansi ODBC apis) with a unicode ODBC driver then the ODBC Driver manager will have to convert the UCS-2 the driver returns to 8 bit (lossy) and convert the 8 bit data you pass to the driver to UCS-2. So don't do that.

These days I'd be surprised if anyone is still using ANSI ODBC drivers.

ansi mysql_MySQL的ANSI和Unicode驱动程序之间的区别相关推荐

  1. ASCII, GB2312, GBK, Unicode, UTF8之间的区别和联系

    原文链接:https://zhuanlan.zhihu.com/p/258345888 感谢原作者的分享~本博客仅仅是为了做笔记 计算机是美国人发明的, 早期在处理文字方面, 美国人很自然地只考虑处理 ...

  2. 关于编码ansi、GB2312、unicode与utf-8的区别

     关于编码ansi.GB2312.unicode与utf-8的区别 2014-01-25 08:51 529人阅读 评论(0) 收藏 举报 本文章已收录于: 关于编码ansi.GB2312.uni ...

  3. AJPFX解析关于编码ansi、GB2312、unicode与utf-8的区别

    大家平时遇到乱码问题是否有自己的一套解决方案?这篇文章就是介绍一下常用的编码方式 关于编码ansi.GB2312.unicode与utf-8的区别 先做一个小小的试验: 在一个文件夹里,把一个txt文 ...

  4. oracle gbk ebcdic,文件编码 ANSI、GBK、GB2312、MS936、MS932、SJIS、Windows-31 、EUC-JP 、EBCDIC 等等之间的区别与联系...

    ■前言 暂且不谈 UTF-8,Unicode (UTF-8只是Unicode的一种实现方式) https://blog.csdn.net/sxzlc/article/details/106084402 ...

  5. ANSI C、C89、C99和C51的区别

    ANSI C.C89.C99和C51的区别 什么是ANSI C.ISO C.C89.C90标准? 随着C语言使用得越来越广泛,出现了许多新问题,人们日益强烈地要求对C语言进行标准化.1983年,美国国 ...

  6. html 计算器 ansi转换,HTML ANSI

    HTML ANSI(Windows-1252) 参考手册 ANSI(Windows-1252) ANSI 是 Windows 95 及其之前的 Windows 系统中默认的字符集. ANSI 也称为 ...

  7. php里面sql是什么意思,MySQL和SQL是什么?MySQL和SQL之间的区别有哪些

    MySQL和SQL之间的区别有哪些?很多PHP的初学者,对MySQL,MyAdmin和SQL有什么区别并不是很清楚?下面 第一PHP社区 就带领大家来学习一下MySQL和SQL之间的区别.[推荐阅读: ...

  8. C# 如何捕获键盘按钮和组合键以及KeyPress/KeyDown事件之间的区别 (附KeyChar/KeyCode值)

    1. 首先将窗口属性KeyPreview设为true,如果属性对话框中找不到,就直接在代码里添加:  2. 添加KeyPress / KeyDown事件: 1.KeyPress 和KeyDown .K ...

  9. 新版JESD625C 和 JESD625B 条款之间的区别变更说明

    Differences Between JESD625C and JESD625B Clause Description of change JESD625C 和 JESD625B 条款之间的区别 变 ...

最新文章

  1. 用JDBC写一个学生管理系统(添加、删除、修改、查询学生信息)(二)
  2. bzoj5039:[Jsoi2014]序列维护
  3. Android性能调优利器StrictMode
  4. SQL SERVER 数据库如何限制一列不能重复(已经有主键)
  5. JAVA学习day07 1
  6. .NET、C#和ASP.NET三者之间的区别与联系
  7. 在qt中获取halcon窗口图片_Qt联合HALCON显示文件夹图片及初步处理
  8. python怎么实现deepcopy_deepcopy和python-避免使用的提示?
  9. OpenMP4.0: #pragma openmp simd实现SIMD指令优化(ARM,X86,MIPS)
  10. 谷歌离线地图WMS/WMTS服务
  11. pinia - 大菠萝的使用
  12. ubuntu16.04设置自启动wifi热点
  13. 小米MIUI12.5手机降级教程,线刷
  14. 如何把视频转换为gif动图
  15. 每天学习写论文——Day24 光说不练假把式,毕设就是第一步
  16. EXCEL应用:思迈特软件Smartbi数据可视化终极教程
  17. 拓尔思信息科技股份有限公司2019校园春季招聘
  18. 使用华为云跑自己的深度学习模型教程
  19. 技术点:vue3 使用 ref 绑定 router-view,想调取某个子路由中的方法来重载数据
  20. 从今天开始给自己定一个小目标

热门文章

  1. 【Flink】Unable to retrieve any partitions with KafkaTopicsDescriptor: Fixed Topics ([xxx)]
  2. 【MySQL】MySQL 8报错 Unknown initial character set index 255 received from server. Initial client char
  3. mac 下 ~/.bash_profile无效
  4. MySQL:MySQL InnoDB引擎
  5. git : 上传大文件或者PDF或者二进制文件导致无法上传
  6. JsonPath工具类封装
  7. async-http java_使用Java和async-http-client通过基本身份验证获取URL内容 - java
  8. c++禁止进程被结束_第四章 进程管理
  9. java基础环境搭建_java基础环境搭建
  10. 用Elman做时序预测