Преглед на файлове

🐛 Fix UTF-8 errror in configuration embed and retrieve (#23303)

The feature added in commit b464a4b1a4 introduced a UTF-8 encoding error for all users where UTF-8 is not the default codepage.
Robby Candra преди 2 години
родител
ревизия
6dc056f771
No account linked to committer's email address
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1
    1
      buildroot/share/PlatformIO/scripts/signature.py

+ 1
- 1
buildroot/share/PlatformIO/scripts/signature.py Целия файл

@@ -12,7 +12,7 @@ import os,subprocess,re,json,hashlib
12 12
 # headers.
13 13
 #
14 14
 def extract_defines(filepath):
15
-	f = open(filepath).read().split("\n")
15
+	f = open(filepath, encoding="utf8").read().split("\n")
16 16
 	a = []
17 17
 	for line in f:
18 18
 		sline = line.strip(" \t\n\r")

Loading…
Отказ
Запис