Bug #114317 'Table Data import wizard' does not work with CSV files containing Korean charac
Submitted: 12 Mar 2024 10:30 Modified: 12 Mar 2024 15:17
Reporter: jun lee Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.36 OS:Any
Assigned to: CPU Architecture:Any
Tags: csv import, korean language, UTF-8, workbecnh

[12 Mar 2024 10:30] jun lee
Description:
I am in Korea. After creating a database, when I click on the database in the left scheme tab and try to import a csv file through the 'Table Data import wizard', the following error occurs and it does not work.
-----
Unhandled exception: 'ascii' codec can't decode byte 0xec in position 121: ordinal not in range(128)

Check the log for more details.
-----

The log message looks like this

-----
19:05:22 [ERR][       pymforms]: Unhandled exception in Python code:
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_page_widget.py", line 97, in go_next
    self.main.go_next_page()
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_form.py", line 76, in go_next_page
    self.pages[index].page_activated(True)
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_wizard.py", line 185, in page_activated
    self.call_create_preview_table()
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_wizard.py", line 343, in call_create_preview_table
    self.create_preview_table(self.call_analyze())
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_wizard.py", line 352, in call_analyze
    if not self.active_module.analyze_file():
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_export_be.py", line 505, in analyze_file
    line = csvfile.readline()
  File "/Applications/MySQLWorkbench.app/Contents/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xec in position 121: ordinal not in range(128)
---

This issue has been around for a long time and has not been fixed. The csv file in question is obviously UTF-8 encoded, but the same issue persists.

The funny thing is that on macOS, if I run the workbench from the terminal via Open /Applications/MySQLWorkbench.app, it imports without a problem. I haven't found a way to do this on Windows yet.

How can this be done? Please fix it.

How to repeat:
https://www.dropbox.com/scl/fi/4gx7ozpkxxuf9tmkgqgqw/TB_ONI_CTVT_ITT_CSV.csv?rlkey=0bxe6mz...

Please download and import this csv.

Suggested fix:
I want to import a CSV file that contains Korean without any problems.
[12 Mar 2024 12:44] MySQL Verification Team
Hello!

Thank you for the bug report.
Imho this is duplicate of Bug #95700, please see Bug #95700.

Regards,
Ashwini Patil
[12 Mar 2024 15:17] jun lee
I found soulution. Thanks.