Skip to content

Issue 386: LookupError: unknown encoding: utf8mb3 #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
5 changes: 5 additions & 0 deletions pymysqlreplication/row_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ def __read_fsp(self, column):

@staticmethod
def charset_to_encoding(name):
# Pymysql has no charset for utf8mb3, and this breaks decoding.
# Mysql has deprecated utf8mb3, and in mariadb utf8 is an alias for utf8mb3
if name == 'utf8mb3':
name = 'utf8'

charset = charset_by_name(name)
return charset.encoding if charset else name

Expand Down