Ver código fonte

🐛 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 anos atrás
pai
commit
6dc056f771
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      buildroot/share/PlatformIO/scripts/signature.py

+ 1
- 1
buildroot/share/PlatformIO/scripts/signature.py Ver arquivo

@@ -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")

Carregando…
Cancelar
Salvar