Skip to content

Commit

Permalink
fix encoding bug when dealing with unicode list file.
Browse files Browse the repository at this point in the history
  • Loading branch information
sczhengyabin committed Dec 1, 2016
1 parent 34606b6 commit c214834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ def gen_keywords_list_from_str(keywords_str, sep=","):


def gen_keywords_list_from_file(filepath):
with open(filepath, "r") as f:
with open(filepath, "r", encoding="utf-8") as f:
return f.readlines()

0 comments on commit c214834

Please sign in to comment.