解决python读取文件报错UnicodeDecodeError: 'gbk' codec can't decode byte 0xbc in position 124: illegal multibyte sequence问题

示例代码:

with open(base_path + "\\config\\user.json",encoding='utf-8') as f:
    data = json.load(f)
    print(data)


效果:

posted @ 2023-08-09 08:30  久曲健  阅读(29)  评论(0编辑  收藏  举报