dm 7 years ago
parent
commit
f7ad194afe
1 changed files with 3 additions and 2 deletions
  1. 3 2
      rename_project.py

+ 3 - 2
rename_project.py

@@ -24,12 +24,13 @@ def process_file(path, src, dest):
         with open(path, "rb") as fp:
             data = fp.read()
 
-        data = data.encode('utf-8')
-        data = replace_data(data, src, dest)
         data = data.decode('utf-8')
+        data = replace_data(data, src, dest)
+        data = data.encode('utf-8')
 
         with open(path, "wb") as fp:
             fp.write(data)
+
     except:
         pass