From 43ed17583aaad0af22f4e7864e862a521a4cbde7 Mon Sep 17 00:00:00 2001 From: Jason2866 Date: Fri, 27 Mar 2026 11:42:23 +0100 Subject: [PATCH 1/2] fix: LittleFS Filename encoding UTF-8 --- builder/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builder/main.py b/builder/main.py index e4b27ab4e..b553ba1c6 100644 --- a/builder/main.py +++ b/builder/main.py @@ -52,6 +52,8 @@ PYTHON_EXE, esptool_binary_path = platform.setup_python_env(env) from littlefs import LittleFS +from littlefs import lfs as _lfs +_lfs.FILENAME_ENCODING = "utf-8" from fatfs import Partition, RamDisk, create_extended_partition from fatfs import create_esp32_wl_image from fatfs import calculate_esp32_wl_overhead @@ -298,7 +300,7 @@ def _parse_partitions(env): next_offset = 0 app_offset = 0x10000 # Default address for firmware - with open(partitions_csv) as fp: + with open(partitions_csv, encoding="utf-8") as fp: for line in fp.readlines(): line = line.strip() if not line or line.startswith("#"): From 3b6b7f622c6505420d1195b88f236ea73168762e Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:57:09 +0100 Subject: [PATCH 2/2] Simplify file open call for partitions CSV Remove encoding specification when opening the CSV file. --- builder/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/main.py b/builder/main.py index b553ba1c6..b691a1217 100644 --- a/builder/main.py +++ b/builder/main.py @@ -300,7 +300,7 @@ def _parse_partitions(env): next_offset = 0 app_offset = 0x10000 # Default address for firmware - with open(partitions_csv, encoding="utf-8") as fp: + with open(partitions_csv) as fp: for line in fp.readlines(): line = line.strip() if not line or line.startswith("#"):