Skip to content

Commit a74432c

Browse files
committed
intercept utf8mb3 charset and replace with its alias utf8 to avoid decoding failure
1 parent 5141136 commit a74432c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pymysqlreplication/row_event.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ def __read_fsp(self, column):
240240

241241
@staticmethod
242242
def charset_to_encoding(name):
243+
# there is no charset for utf8mb3, and this break decoding.
244+
# Mysql has deprecated utf8mb3, and in mariadb utf8 is an alias for utf8mb3
245+
if name == 'utf8mb3':
246+
name = 'utf8'
247+
243248
charset = charset_by_name(name)
244249
return charset.encoding if charset else name
245250

0 commit comments

Comments
 (0)