Delete every non utf-8 symbols from string
Delete every non utf-8 symbols from string Question: I have a big amount of files and parser. What I Have to do is strip all non utf-8 symbols and put data in mongodb. Currently I have code like this. with open(fname, “r”) as fp: for line in fp: line = line.strip() line = line.decode(‘utf-8’, ‘ignore’) …