I was trying to use table data import wizard to import a csv file that uses utf-8 character set, and then the following error message shows up.
MySQLWorkbench - error message - Unhandled exception: 'ascii' codec can't decode byte Oxe4 in position 9: ordinal not in range (128)
I have tried to set the schema's character set to utf-8/utfmb4, but it didn't work. The csv file is converted from Excel, and all its cells have been set to text form. I have to use utf-8 for the needed table for future use. How can I import this csv file? Do I need to change the server and the database's encoding language? If so, how can I do this on Mac?
3 Answers 3
I was able to resolve this exact issue by opening up MySQLWorkbench using terminal instead of Finder:
$ open /Applications/MySQLWorkbench.app
This solution was found to solve a similar problem: https://stackoverflow.com/questions/71099489/mysql-workbench-table-export-unicodeencodeerror
It sounds like you have ä
in your data. That is hex E4
in CHARACTER SET latin1
.
If you are expecting ä
, then you need to declare something "latin1", not Ascii'.
It is also possible that E4
is part of a UTF-8 character. Let's see some more data to help you.
I think mysql workbench version change will work, it's sometimes we get problem with mysql workbench problem.If no apprach is working, friendly suggestion use latest or lts version of mysql.
-
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Marcello Miorelli– Marcello Miorelli2025年03月14日 06:17:03 +00:00Commented Mar 14 at 6:17