Bug #105516 Connector/Net doesn't recognize utf8mb3
Submitted: 10 Nov 2021 13:18 Modified: 22 Nov 2021 16:39
Reporter: Sergei Golubchik Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[10 Nov 2021 13:18] Sergei Golubchik
Description:
Connector/Net knows "utf8" and "utf8mb4" character sets

https://github.com/mysql/mysql-connector-net/blob/e39b64edbb/MySQL.Data/src/CharSetMap.cs#...
https://github.com/mysql/mysql-connector-net/blob/e39b64edbb/MySQL.Data/src/CharSetMap.cs#...

but not "utf8mb3". This causes problems for users, like

https://stackoverflow.com/questions/68645324/system-notsupportedexception-character-set-ut...
https://stackoverflow.com/questions/69895282/unable-to-connect-to-mysql-db-with-powershell...
https://stackoverflow.com/questions/69882739/changing-utf8mb3-to-mb4-mariadb

forcing them to ALTER TABLE all tables in all databases or to move away from MySQL Connector/Net.

How to repeat:
Connect-MySqlServer -Server "127.0.0.1" -Database "pcinventory" -UserName "root" -Password $pass

Suggested fix:
      _mapping.Add("estonia", new CharacterSet("iso-8859-13", 1));
      _mapping.Add("dos", new CharacterSet("ibm437", 1));
+     _mapping.Add("utf8mb3", new CharacterSet("utf-8", 3));
      _mapping.Add("utf8mb4", new CharacterSet("utf-8", 4));
      _mapping.Add("utf16", new CharacterSet("utf-16BE", 2));
[10 Nov 2021 13:27] MySQL Verification Team
Hello Sergei,

Thank you for the report and feedback.

Sincerely,
Umesh
[22 Nov 2021 16:39] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/NET 8.0.28 release, and here's the proposed changelog entry from the documentation team:

Connector/NET did not support the utf8mb3 character set, which could cause 
compatibility issues with other software components.

Thank you for the bug report.
[6 Dec 2021 1:05] Jean Ressouche
May i ask if you have an ETA for this release publication?
[29 Nov 2022 13:55] Alex Alex
MySQL Connector/NET 8.0.28 has been released 2022-01-18: https://dev.mysql.com/doc/relnotes/connector-net/en/news-8-0-28.html