Skip to content

Instantly share code, notes, and snippets.

@lartpang
Created March 25, 2019 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lartpang/c6713a29f7ae17951113651dff94d2f7 to your computer and use it in GitHub Desktop.
Save lartpang/c6713a29f7ae17951113651dff94d2f7 to your computer and use it in GitHub Desktop.
一种针对平台编码方式编码的方法
# -*- coding:YTF-8 -*-
import sys
type = sys.getfilesystemencoding()
...
decode('UTF-8').encode(type)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment