将希伯来字符插入 MySql DB
我有一个连接到 MySql 数据库的 asp.net 页面。
当我尝试将网页中的值插入/更新到数据库时 字符在数据库中显示为问号(我正在使用 SP)。 如果我直接在数据库中编写查询,它将起作用并且字符 将正确显示。
DB默认字符集是utf8,列排序规则是utf8_general_ci。
10x很多&祝周末愉快:)
I have an asp.net page connected to a MySql DB.
When I try to insert/update values from the webpage into the DB
the chars are shown in the DB as question marks (I am using SP).
If i will write a query directly in the DB, It will work and the chars
will be displayed correctly.
The DB default charset is utf8, and the column collation is utf8_general_ci.
10x alot & Have a great weekend :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最终解决我问题的方法是将 CharSet=utf8 添加到连接字符串中。
每个人都 10 倍:)
Eventually what solved my problem is adding CharSet=utf8 to the connection string.
10x alot everyone :)
我相信您的 C# 字符串被视为 unicode 而不是 UTF8
我前一段时间找到的片段中的一些示例代码:
I believe your C# strings are being treated as unicode instead of UTF8
Some sample code from a snippet I had found some time ago: