3 Star 9 Fork 0

zcatt/bookcode2019

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
codecs_decode.py 439 Bytes
Copy Edit Raw Blame History
zcatt authored 2020-05-06 16:31 +08:00 . add python 6 and 7
#!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Representations of values using different encodings.
"""
#end_pymotw_header
from codecs_to_hex import to_hex
text = 'français'
encoded = text.encode('utf-8')
decoded = encoded.decode('utf-8')
print('Original :', repr(text))
print('Encoded :', to_hex(encoded, 1), type(encoded))
print('Decoded :', repr(decoded), type(decoded))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zcatt/bookcode2019.git
git@gitee.com:zcatt/bookcode2019.git
zcatt
bookcode2019
bookcode2019
master

Search