Home > database >  Unhandled exception: 'ascii' codec can't decode byte 0xc2 in position 3797: ordinal n
Unhandled exception: 'ascii' codec can't decode byte 0xc2 in position 3797: ordinal n

Time:11-21

I'm trying to import a .csv file to MySQL using the table data import wizard, but I keep getting this error. Could someone explain what this means and how I would go about fixing it.

CodePudding user response:

I found 0xc2 was  symbol.

but ASCII code can only express a limited characters.

I can't give you an exact answer because of the lack of information.

check your data, filename, directory name.

if you find something non-ascii character. maybe that cause exception.

CodePudding user response:

This means that in your CSV file there is a byte 0xc2, or 194 decimal, known as character "Â".

Allowed range for characters in given column in your table is 0-127, a.k.a. "normal" ASCII characters, so import was aborted.

Character "Â" most likely is part of some non-English name. You need to filter it out or change settings of your table to accept character set of CSV file.

  • Related