当前位置:网站首页>UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd6 in position 120: invalid continuation byte
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd6 in position 120: invalid continuation byte
2022-08-04 21:09:00 【fd-度假的鱼】
将utf-8 该为 gbk
with open('06.json', encoding='gbk') as f:
编码一直是让新手头疼的问题,特别是GBK、GB2312、UTF-8 这三个比较常见的网页编码的区别,更是让许多新手晕头转向,怎么解释也解释不清楚。但是编码又是那么重要,特别在网页这一块。如果你打出来的不是乱码,而网页中出现了乱码,绝大部分原因就出在了编码上了。此外除了乱码之外,还会出现一些其他问题(例如: 1E6的CSS加载问题)等等。
GBK:专门用来解决中文编码,双字节。
是在国家标准GB2312基础.上扩容后兼容GB2312标准。
包含全部中文字符。
UTF-8:解决国际上制度的- -种多字节编码,对英文使用8位( 1个字节) , 中文使用24位( 3个字节)来编码。对于英文字符较多的论坛适用于UTF- 8节省空间。
包含全世界所有国家需要用到的字符。
边栏推荐
猜你喜欢
After the tester with 10 years of service "naked resignation" from the big factory...
How to make good use of builder mode
Five Minutes Introductory Text Processing Three Musketeers grep awk sed
实战:10 种实现延迟任务的方法,附代码!
[2022 Hangzhou Electric Multi-School 5 1003 Slipper] Multiple Super Source Points + Shortest Path
buu web
SPSS-System Clustering Software Practice
数字IC设计中基本运算的粗略的延时估计
After encountering MapStruct, the conversion between PO, DTO and VO objects is no longer handwritten
[Academic related] Tsinghua professor persuaded to quit his Ph.D.:I have seen too many doctoral students have mental breakdowns, mental imbalances, physical collapses, and nothing!...
随机推荐
How to train a deep learning model?
括号匹配
【PCBA program design】Grip dynamometer program
Oreo domain name authorization verification system v1.0.6 public open source version website source code
Pinduoduo open platform order information query interface [pdd.order.basic.list.get order basic information list query interface (according to transaction time)] code docking tutorial
27. Dimensionality reduction
visual studio 2015 warning MSB3246
stm32mp157系统移植 | 移植ST官方5.10内核到小熊派开发板
【数据挖掘】搜狐公司数据挖掘工程师笔试题
香港暂停进口俄罗斯部分地区禽肉及禽类产品
Comic | Two weeks after the boss laid me off, he hired me back and doubled my salary!
Common methods of js's new Function()
ini怎么使用? C#教程
模拟对抗之红队免杀开发实践
How to understand the crawler's Scrapy framework in the simplest and most popular way?
数电快速入门(一)(BCD码和三种基本逻辑运算的介绍)
88. (the home of cesium) cesium polymerization figure
用 Excel 爬取网络数据的四个小案例
暴雨中的人
dotnet enables JIT multi-core compilation to improve startup performance