关于sqlite3数据库查询结果乱码
我用sqlite3做了一个查询,查询结果为[(1, b'\xcd\xf5\xbd\xa8\xd0\xa3', b'1976-12-29', b'1999-12-01', b'\xcc\xec\xcb\xae\xb9\xab\xcb\xbe', b'\xb5\xb3\xd6\xa7\xb2\xbf\xca\xe9\xbc\xc7')],这是编码的问题,求大侠帮我一下。谢谢了!!!!
list1 = [(1, b'\xcd\xf5\xbd\xa8\xd0\xa3', b'1976-12-29', b'1999-12-01', b'\xcc\xec\xcb\xae\xb9\xab\xcb\xbe', b'\xb5\xb3\xd6\xa7\xb2\xbf\xca\xe9\xbc\xc7')] for aa in list1[0]: if type(aa).__name__ == 'bytes': print(aa.decode('gbk')) else: print(aa)