Created
March 8, 2011 01:35
-
-
Save dervn/859672 to your computer and use it in GitHub Desktop.
unicode处理 errors='ignore'
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
#‘ignore’ (just leave the character out of the Unicode result) | |
#replace | |
unicode('\x80abc', errors='ignore') | |
text = "第二十集神兵天降 第七章 旦雅之危" | |
text.decode('gb2312',errors='ignore') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment