Skip to content

Mysql2::Error: Unsupported charset: '"utf8mb3"' #1315

Closed
@mookie-

Description

@mookie-

Hello,

after upgrading to Mariadb 10.6, I've encountered this issue:

Mysql2::Error: Unsupported charset: '"utf8mb3"'
/var/www/example_s/shared/bundle/ruby/3.2.0/gems/mysql2-0.5.5/lib/mysql2/client.rb:49:in `charset_name='
/var/www/example_s/shared/bundle/ruby/3.2.0/gems/mysql2-0.5.5/lib/mysql2/client.rb:49:in `initialize'

I think the issue is due to the fact that utf8mb3 is not in mysql2_mysql_enc_name_to_rb_map (

static const struct mysql2_mysql_enc_name_to_rb_map wordlist[] =
).

MariaDB changed the default utf8 to be named utf8mb3 in 10.6 (https://mariadb.com/kb/en/unicode/) and MySQL will changed it in MySQL 8.0.28 (https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-utf8mb3.html).
To be future compatible, it would be nice to use utf8mb3 as encoding.

Unfortunately I feel not be able to create a good PR for it. It would be nice if someone could add this in the future.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions