Skip to content

Commit

Permalink
fix windows open unicode file with cp950 codec issue
Browse files Browse the repository at this point in the history
  • Loading branch information
allenyllee committed May 3, 2021
1 parent 205dbbc commit b13cfbb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AI_Clerk_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Created Date: Monday, May 4th 2020, 3:06:41 pm
# Author: Allenyl(allen7575@gmail.com>)
# -----
# Last Modified: Monday, May 3rd 2021, 4:33:00 pm
# Last Modified: Monday, May 3rd 2021, 6:03:55 pm
# Modified By: Allenyl(allen7575@gmail.com)
# -----
# Copyright 2018 - 2020 Allenyl Copyright, Allenyl Company
Expand Down Expand Up @@ -931,7 +931,7 @@ def main():
## 再次上傳後下載回來才會是正確的 TextID
common_filename = Path(args.input_file)
# df = pd.read_json(args.input_file)
with open(common_filename) as f:
with open(common_filename, 'r', encoding='utf-8') as f:
data = json.load(f)

data2 = {}
Expand All @@ -953,10 +953,10 @@ def main():
common_filename_1 = Path(args.input_file_1)
common_filename_2 = Path(args.input_file_2)
# df = pd.read_json(args.input_file)
with open(common_filename_1) as f:
with open(common_filename_1, 'r', encoding='utf-8') as f:
data1 = json.load(f)

with open(common_filename_2) as f:
with open(common_filename_2, 'r', encoding='utf-8') as f:
data2 = json.load(f)

data3 = {}
Expand Down

0 comments on commit b13cfbb

Please sign in to comment.