MySQL 连接器 .NET 和统一码

发布于 2024-12-09 06:58:53 字数 643 浏览 0 评论 0原文

我在尝试让 MySql Connector for .NET 将 unicode 文本插入数据库时​​遇到一些严重问题。我读过很多关于此问题的论坛,但似乎没有一个修复程序有效。我已经尝试了以下所有内容及其各种组合:

- Append ;charset=utf8 to connection string
- Append ;character set=utf8 to connection string
- Use 'N' prefix (although, I believe this is for MsSql only, but was worth a try)
- Set utf8 collations for database, table and columns
- Issue this command: SET NAMES UTF8
- Issue this command: SET CHARACTER SET UTF8
- Tried both Direct ad-hoc query and MySqlParameter as ways to insert

我正在使用 MySqlConnector 6.4.3,无论我做什么,我都无法让这个可怜的东西工作。我快要失去理智了...

有人遇到过类似的问题并解决了吗?

预先非常感谢

马特

I am having some serious issues trying to get MySql Connector for .NET to insert unicode text into the database. I have read so many forums on this and none of the fixes seems to work. I have tried all fo the following and various combinations thereof:

- Append ;charset=utf8 to connection string
- Append ;character set=utf8 to connection string
- Use 'N' prefix (although, I believe this is for MsSql only, but was worth a try)
- Set utf8 collations for database, table and columns
- Issue this command: SET NAMES UTF8
- Issue this command: SET CHARACTER SET UTF8
- Tried both Direct ad-hoc query and MySqlParameter as ways to insert

I am using MySqlConnector 6.4.3 and no matter what I do, I cannot get this wretched thing to work. I'm about to lose my mind...

Anyone had a similar issue and fixed it??

Many thanks in advance

Matt

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文