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

发布时间 2023-08-09 08:33:32作者: 久曲健

示例代码:

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


效果: