MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_utf8_env

Function get_utf8_env

ci/compiler/build_utils.py:9–22  ·  view source on GitHub ↗

Get environment with UTF-8 encoding to prevent Windows CP1252 encoding errors. PlatformIO outputs Unicode characters (checkmarks, etc.) that fail on Windows when using the default CP1252 console encoding. This ensures UTF-8 is used. Note: This function inherits Git Bash environment var

()

Source from the content-addressed store, hash-verified

7
8
9def get_utf8_env() -> dict[str, str]:
10 """Get environment with UTF-8 encoding to prevent Windows CP1252 encoding errors.
11
12 PlatformIO outputs Unicode characters (checkmarks, etc.) that fail on Windows
13 when using the default CP1252 console encoding. This ensures UTF-8 is used.
14
15 Note: This function inherits Git Bash environment variables. For PlatformIO
16 operations that must run via CMD (e.g., ESP32-C6 compilation), use
17 get_pio_execution_env() instead.
18 """
19 env = os.environ.copy()
20 env["PYTHONIOENCODING"] = "utf-8:replace"
21 env["PYTHONUTF8"] = "1"
22 return env
23
24
25def get_pio_execution_env() -> dict[str, str]:

Callers 5

run_cpp_lintFunction · 0.90
install_packagesMethod · 0.90
runMethod · 0.90
get_pio_execution_envFunction · 0.85

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected