ruby-on-rails - 错误:“不兼容的字符编码:ASCII-8BIT 和 UTF-8”和“UTF-8 中的无效字节序列”在 SQL Server 2008 R2 中创建记录 RoR 时
问题描述
解决方案
After research for a long time, I found that the windows encoding is the problem.
I released that I can't input symbol such as "✓". It return the same error. And then I tried to trace what input in SQL profiler will transfer to database table, it same as "✓". But it should be encoded of "✓" (I had check the value also in my local).
After research and googling for a long time, I found this post https://superuser.com/questions/336197/unicode-characters-suddenly-start-displaying-as-boxes-in-some-applications?newreg=8b561b87000d4e79b20cbea9c3d2eb07
I tried it and restart the PC. and my application can save "✓" or Chinese character again. It saved become encoded string to database.
(I'm still looking for the reason, how come the windows unicode is the root of this problem)
推荐阅读
- python - Pandas 错误:将一列读取为 python 值(浮点/整数值),将另一列读取为 numpy.float64
- flutter - 如何使用提供程序 5.0.0 实现这种类型的底部导航小部件 - 颤振
- visual-studio-code - 代码 。命令在 VSCode 终端上工作,但在 Windows 终端上不工作
- algorithm - 文本块到段落组合算法......从哪里开始?
- python-2.7 - pip install prettytable 并收到错误“SyntaxError:无效语法”
- git - Tortoise git commit 不适用于多个存储库
- vba - 隐藏/取消隐藏基于控件标签的主窗体上的控件,在连续子窗体中使用当前事件
- rust - rust 找出闭包注释/签名
- python - 等到特定时间启动线程
- python-3.x - 函数名称为 thue 莫尔斯序列的 pyhton3 程序