Pycharm DB Editor: [0S100] Unsupported character encoding 'utf8mb4'.

已回答

I am using the database tools in PyCharm (professional edition) with a MySQL 5.7 database that I just changed to use utf8mb4 encoding. However, now, the database tools won't access the database (i.e. I can't see what's in tables, etc.). I am getting the following message...

java.io.UnsupportedEncodingException: utf8mb4.

To be clear, this is not affecting my Python code's access to the database, it's only the DB tools that allow me to look into tables, etc. while I'm debugging. Any ideas on how to fix this? Thanks!

0

Hello,

please add this to the very end of your connection URL right after database name:

?useUnicode=true&character_set_server=utf8mb4

also you can try to remove|change value for characterEncoding on Advanced tab of Data Source properties.

also please read this issue https://youtrack.jetbrains.com/issue/DBE-4216

0

Thank you, @... , I tried a few variations on your idea and got things to work! Here are the things I had to do:

1) I added the string you suggested ?useUnicode=true&character_set_server=utf8mb4 to my connection

2) I removed the character set types from the advanced tab. These defaulted back to utf8 (i.e. I couldn't leave them blank). But that seemed to work.

So, I'm back in business. Thank you!

Ben

 

 

0

One more update here. It turns out that I don't think I even needed the addition to my connection string. It seems that that the trick was to remove the character set types from the advanced tab and that seems to have fixed everything. (I had changed them to utf8mb4 earlier when I first changed my DB to that encoding).

Thanks again!

Ben

0

请先登录再写评论。