Skip to content

Fail when the ecoding is ucs2 #159

Open
@guerremdq

Description

@guerremdq

Hello,

I had a field in the table with charset ucs2

test_field  varchar(100) CHARACTER SET ucs2 DEFAULT NULL COMMENT

and the is failing with this error:

Traceback (most recent call last):
 File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
   self.run()
 File "lazarus.py", line 85, in run
   for row in binlogevent.rows:
 File "/usr/local/lib/python2.7/dist-packages/pymysqlreplication/row_event.py", line 397, in rows
   self._fetch_rows()
 File "/usr/local/lib/python2.7/dist-packages/pymysqlreplication/row_event.py", line 392, in _fetch_rows
   self.__rows.append(self._fetch_one_row())
 File "/usr/local/lib/python2.7/dist-packages/pymysqlreplication/row_event.py", line 445, in _fetch_one_row
   row["values"] = self._read_column_data(self.columns_present_bitmap)
 File "/usr/local/lib/python2.7/dist-packages/pymysqlreplication/row_event.py", line 118, in _read_column_data
   values[name] = self.__read_string(1, column)
 File "/usr/local/lib/python2.7/dist-packages/pymysqlreplication/row_event.py", line 197, in __read_string
   string = string.decode(column.character_set_name)
LookupError: unknown encoding: ucs2

It's possible to support this encoding?

Thaks

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