Resolve MySQL Unhandled exception: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

Hello,
I am trying to add data to my MySQL database using the import wizard. However, I am getting the following error in the MySQL Workbench

Unhandled exception: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

Checking SELECT @@character_set_database, @@collation_database; I obtain the following result:

utf8mb4

I am not sure what I need to do or where I need to do it to get around this issue. Is there someone that can help?

Thank you.

1 Reply

Whatever you are trying to import (as ASCII text) contains a character that the codec does not recognize as ASCII text (0xef -- ordinal 239). You need to search the data you're trying to import for characters with an ordinal not in the range 0 - 128 and replace them with something else…or use a different codec for your import/export operation.

I have no idea how to change the codec…you probably have to change the table definition.

Also this appears to be a long-standing bug in MySQL workbench (dating back to 2011). I couldn't determine if it was ever fixed. Do a Google search on the error message you're getting.

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct