{"push_id":3089882914,"size":1,"distinct_size":1,"ref":"refs/heads/patch-1","head":"d007d7eab23c00f754d402ed9efe28643d9bbfbb","before":"826539d06b8bcef74fe755e7489b8a8255628f12","commits":[{"sha":"d007d7eab23c00f754d402ed9efe28643d9bbfbb","author":{"name":"peterandluc","email":"5e58e9b595d2b5db03c2b9ef897b1b08f4ac78ca@qq.com"},"message":"Fix UnicodeDecodeError\n\nIssue:\r\nWhen there are some data like emoji which can not decode by 'utf-8', it could cause such error:\r\n\r\n~\\AppData\\Local\\Continuum\\anaconda3\\envs\\work\\lib\\site-packages\\pyhdb\\protocol\\lobs.py in _decode_lob_data(cls, payload_data)\r\n     77     @classmethod\r\n     78     def _decode_lob_data(cls, payload_data):\r\n---> 79         return payload_data.decode(cls.encoding) if cls.encoding else payload_data\r\n     80 \r\n     81     def __init__(self, init_value='', lob_header=None, connection=None):\r\n\r\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 37: invalid continuation byte\r\n\r\nThe problem here is the previous function assumes data is pure bytes type encoding from str, however it may happen that the data is not clean. \r\n\r\nSolution:\r\nIf the data is not clean or can not decode to str, then return it empty with same length (or better solution? remove it?)","distinct":true,"url":"https://api.github.com/repos/peterandluc/PyHDB/commits/d007d7eab23c00f754d402ed9efe28643d9bbfbb"}]}
{"actor":{"display_login":"peterandluc"}}