FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonStudy/decode_encode/test2.txt at master · gitstudy8/pythonStudy · GitHub
gitstudy8
pythonStudy
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonStudy
/
decode_encode
/
test2.txt
Copy path
More file actions
More file actions
Latest commit
History
History
History
10 lines (10 loc) · 600 Bytes
Breadcrumbs
pythonStudy
/
decode_encode
/
test2.txt
Copy path
File metadata and controls
10 lines (10 loc) · 600 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
# -*- coding: utf-8 -*-
#---------------------------------
# Python编码介绍——encode和decode
#### 将http://blog.chinaunix.net/uid-27838438-id-4227131.html
# 将其他编码的字符串解码(decode)成 Unicode
# 再从 Unicode编码(encode)成另一种编码
# 对 Unicode 进行编码和对 str 进行编码都是错误的
# 要在同一个文本中进行两种编码的输出等操作就必须进行编码的转换,
# 先用decode将文本原来的编码转换成Unicode,再用encode将编码转换成需要转换成的编码。
#---------------------------------
Back
|
FazBrowse Home
|
New Git URL