From 67d725a96fe552fcab9db9e6015028f875e303aa Mon Sep 17 00:00:00 2001 From: Koki Mizumoto <21km43@gmail.com> Date: Tue, 21 Mar 2023 22:46:50 +0900 Subject: [PATCH] Update process.py --- plugins/process.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/process.py b/plugins/process.py index 879fead..d4e1d8c 100644 --- a/plugins/process.py +++ b/plugins/process.py @@ -132,7 +132,7 @@ class ProcessManager: bom_designators = footprint_designators.copy() if len(footprint_designators.items()) > 0: - with open((os.path.join(temp_dir, designatorsFileName)), 'w', encoding='utf-8') as f: + with open((os.path.join(temp_dir, designatorsFileName)), 'w', encoding='utf-8-sig') as f: for key, value in footprint_designators.items(): f.write('%s:%s\n' % (key, value)) @@ -211,7 +211,7 @@ class ProcessManager: }) if len(self.components) > 0: - with open((os.path.join(temp_dir, placementFileName)), 'w', newline='', encoding='utf-8') as outfile: + with open((os.path.join(temp_dir, placementFileName)), 'w', newline='', encoding='utf-8-sig') as outfile: csv_writer = csv.writer(outfile) # writing headers of CSV file csv_writer.writerow(self.components[0].keys()) @@ -223,7 +223,7 @@ class ProcessManager: def generate_bom(self, temp_dir): if len(self.bom) > 0: - with open((os.path.join(temp_dir, bomFileName)), 'w', newline='', encoding='utf-8') as outfile: + with open((os.path.join(temp_dir, bomFileName)), 'w', newline='', encoding='utf-8-sig') as outfile: csv_writer = csv.writer(outfile) # writing headers of CSV file csv_writer.writerow(self.bom[0].keys())