瀏覽代碼

🐛 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…
取消
儲存