All pastes #1923198 Raw Edit

gnu_d

public python v1 · immutable
#1923198 ·published 2010-08-23 08:43 UTC
rendered paste body
                ucontent = open(filename, "rb")                content = u""                for i in ucontent.readlines():                    c = u""                    for e in i:                        try:                            c+= e.encode("utf-8", 'ignore')                        except UnicodeDecodeError:                            c += unicodedata.normalize('NFKD', c)                    content+= c