Skip to content

Instantly share code, notes, and snippets.

@lseongjoo
Created August 18, 2015 09:41
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 lseongjoo/b277887a638381951af5 to your computer and use it in GitHub Desktop.
Save lseongjoo/b277887a638381951af5 to your computer and use it in GitHub Desktop.
콘솔의 인코딩 정보를 활용해 명령줄 인자를 유니코드로 변환하기
# coding: utf-8
# @LeeSeongjoo
import sys
if __name__ == '__main__':
# 명령줄 인자를 유니코드로 변환
uargv = [arg.decode(sys.stdin.encoding) for arg in sys.argv[1:]]
print(uargv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment