#Autor:Decade mag=‘我爱北京天安门‘ print(mag) print(mag.encode(encoding=‘utf-8‘)) #采用utf-8编码格式 print(mag.encode(encoding=‘utf-8‘).decode(encoding=‘utf-8‘))#不使用utf-8的编码格式
#Autor:Decade mag=‘我爱北京天安门‘ print(mag) print(mag.encode(encoding=‘utf-8‘)) #采用utf-8编码格式 print(mag.encode(encoding=‘utf-8‘).decode(encoding=‘utf-8‘))#不使用utf-8的编码格式
原文:https://www.cnblogs.com/Good-Life/p/8601053.html