Gxlsystem TIY Editor
Gxlsystem 在线教程
改变方向
暗黑模式
python_ref_string_encode_2.py:
txt = "My name is St氓le" print(txt.encode(encoding="ascii",errors="backslashreplace")) print(txt.encode(encoding="ascii",errors="ignore")) print(txt.encode(encoding="ascii",errors="namereplace")) print(txt.encode(encoding="ascii",errors="replace")) print(txt.encode(encoding="ascii",errors="xmlcharrefreplace")) print(txt.encode(encoding="ascii",errors="strict"))