Created
October 14, 2015 10:42
-
-
Save zfz/2d7d9c9c5f74b19330df to your computer and use it in GitHub Desktop.
繁體字轉簡體字
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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