From b821bf996e40283cd319d627ae3fd8b3018d2486 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 11 Aug 2013 11:59:57 -0400 Subject: [PATCH] CleanFiles: Remove use of chardet Now that everything is utf8, guessing the character encoding might go haywire, like with the "Pokemon" games. Just assume UTF8 from here on out. --- Tools/CleanFiles.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Tools/CleanFiles.py b/Tools/CleanFiles.py index 3ef6f5ace2..812523204b 100644 --- a/Tools/CleanFiles.py +++ b/Tools/CleanFiles.py @@ -1,5 +1,4 @@ -import chardet import codecs import os import glob @@ -101,11 +100,7 @@ def main(): for name in glob.glob(pattern): in__name = name out_name = name + '.new' - - in_str = open(in__name, 'r').read() - encoding = chardet.detect(in_str) - - in_ = codecs.open(in__name, 'r', encoding['encoding']) + in_ = codecs.open(in__name, 'r', 'utf8') out = codecs.open(out_name, 'w', 'utf8') normalize_ini_file(in_, out) os.rename(out_name, in__name)