关于作者

Discuss / JavaScript / Sequelize.STRING(50) 字段内容为中文报错!!!, 求同学们和廖老师帮帮忙哈

Sequelize.STRING(50) 字段内容为中文报错!!!, 求同学们和廖老师帮帮忙哈

Topic source

遇见最好zll

#1 Created at ...

我在POST操作的时候, 给cinameid字段一个中文值,就下方的这个错误了

Incorrect string value: '\xE8\xA5\xBF\xE6\xB9\x96...' for column 'cinameid' at row 1

廖雪峰

#2 Created at ...

你的mysql编码不对,要设置为utf8,跟Sequelize没有关系


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.