Skip to content

Instantly share code, notes, and snippets.

@zfz
Created October 14, 2015 10:42
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 zfz/2d7d9c9c5f74b19330df to your computer and use it in GitHub Desktop.
Save zfz/2d7d9c9c5f74b19330df to your computer and use it in GitHub Desktop.
繁體字轉簡體字
#!/usr/bin/env python
#-*- coding: utf-8 -*-
#下載以下兩個文件
#zh_wiki.py:https://github.com/skydark/nstools/blob/master/zhtools/zh_wiki.py
#langconv.py:https://github.com/skydark/nstools/blob/master/zhtools/langconv.py
from langconv import Converter
line = u"籃球"
print line
line = Converter('zh-hans').convert(line)
print type(line), line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment