gpt4 book ai didi

Mysql::Error: 不正确的字符串值: '\xE9ditos...' with rails

转载 作者:行者123 更新时间:2023-11-29 07:12:54 24 4
gpt4 key购买 nike

我正在将数据从 CSV 插入数据库。

当我试图插入这一行时

2 créditos,,,,R,75,, 

进入我的数据库时,我收到此错误 Mysql::Error: Incorrect string value: '\xE9ditos...' for column 'message' at row 1: .

最佳答案

CSV 文件中的数据很可能是“Windows-1252”格式(特别是如果它是通过 Excel 获取的)。

恐怕我对 Ruby/Rails 不是很了解,但希望是 this code snippet应该有帮助。 :-)

关于Mysql::Error: 不正确的字符串值: '\xE9ditos...' with rails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3400712/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com