From 8caf7a888eda9a4b140d2d077bfc7eeabd491f20 Mon Sep 17 00:00:00 2001 From: dev-starlight <50508216+dev-starlight@users.noreply.github.com> Date: Tue, 11 Nov 2025 17:02:36 +0800 Subject: [PATCH] Add UTF-8 encoding to read_text method --- freqtrade/configuration/load_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/configuration/load_config.py b/freqtrade/configuration/load_config.py index e18707a99..51d0d381f 100644 --- a/freqtrade/configuration/load_config.py +++ b/freqtrade/configuration/load_config.py @@ -30,7 +30,7 @@ def log_config_error_range(path: str, errmsg: str) -> str: offsetlist = re.findall(r"(?<=Parse\serror\sat\soffset\s)\d+", errmsg) if offsetlist: offset = int(offsetlist[0]) - text = Path(path).read_text() + text = Path(path).read_text(encoding='utf-8') # Fetch an offset of 80 characters around the error line subtext = text[offset - min(80, offset) : offset + 80] segments = subtext.split("\n")