SQL中的UTF-8字符编码 [英] UTF-8 Character Encoding in SQL

查看:573
本文介绍了SQL中的UTF-8字符编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在在完整的Access DB上尝试 Bullzip对MySQL应用程序的访问特殊字符如é和ä.该应用程序允许您指定UTF-8编码,但是在生成的SQL文件中,我得到的是"VieuxCarré"而不是"VieuxCarré".

I am trying out Bullzip's Access to mySQL app on an Access DB full of special chars like é and ä. The app allows you to specify UTF-8 encoding but in the resulting SQL file I get "Vieux Carré" instead of "Vieux Carré".

我尝试在 UltraEdit 中打开SQL文件并进行UTF-8转换,但无法解决此问题我猜它正在转换é"而从未看到é"的问题?

I tried opening the SQL file in UltraEdit and doing a UTF-8 conversion but it does not resolve this issue as I guess it is converting "é" and never sees the "é"?

Good™解决方案是什么?

What is a Good™ solution for this?

推荐答案

问题出在从Access到UTF-8到Unicode的转换.与SQL Server一样,Access只能以本地方式存储ASCII格式或Unicode(UTF-16)数据(关闭Unicode压缩).为了确保正确存储给定值,您需要在存储上将其转换为Unicode,并在检索时将其转换回UTF-8.您也许可以将StrConv功能用于此目的.

The problem is in the UTF-8 to Unicode conversion into or out of Access. Access, like SQL Server, can only natively store data in ASCII format or Unicode (UTF-16) (With Unicode compression off). In order to ensure a given value was stored properly, you would need to convert it to Unicode on storage and convert it back to UTF-8 on retrieval. You may be able to use the StrConv function for such a purpose.

这篇关于SQL中的UTF-8字符编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆