> 1st is this script is from a library module online open source If it's open source, why didn't you show the link to the soruce? I assume your code is this:
https://github.com/siddharth2010/String-Search/blob/6770c7a1e811a5d812e7f9f7c5c83a12e5b28877/createIndex.py And self.collFile is opened here: https://github.com/siddharth2010/String-Search/blob/6770c7a1e811a5d812e7f9f7c5c83a12e5b28877/createIndex.py#L91 You need to add `encoding='utf-8'` argument. -- https://mail.python.org/mailman/listinfo/python-list