dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 376 forks source link

How to add 'charset : utf-8' parameters when connect to the mysql? #549

Closed whyer11 closed 10 years ago

whyer11 commented 10 years ago

I’m scraping the text from websites and putting it in a database, but one website’s text keeps giving me this error when I try to do the database insertion:

Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value: '\xE6\xB8\xB8\xE6\x88\x8F...' for column 'QUES_TITLE' at row 1

Can I add parameters when I connect to the mysql? maybe can fix this error.

whyer11 commented 10 years ago

I know how to resolve this problem,someone get this problem too, you can email me.thank you

jamhall commented 9 years ago

@whyer11 - how did you solve this? Thanks!

whyer11 commented 9 years ago

You should set "UTF8 " when you create the database and the tables in it .

whyer11 commented 9 years ago

You should set "UTF8 " when you create the database and the tables in it .

在 2014年11月13日,下午7:02,Jamie Hall notifications@github.com 写道:

@whyer11 - how did you solve this? Thanks!

— Reply to this email directly or view it on GitHub.