Describe the overall issue and situation
On Windows, scripts/create_provider_plugin.py and the test_plugin.py it generates print Unicode checkmarks (✓ / ✅). Windows consoles default stdout/stderr to a legacy code page (typically cp1252), so both scripts crash with UnicodeEncodeError before the plugin can be generated or verified.
This is the same root-cause class as #108, #158, and #166 (Windows cp1252 vs Unicode), which were fixed for file I/O / HTML export in io.py. The generator script's console output was not covered.
Related to #158 (6 👍; already-fixed HTML/file I/O case). This issue is the remaining console-output path.
Expected behavior
python scripts/create_provider_plugin.py ... and the generated test_plugin.py print status lines successfully on a default Windows console.
Actual behavior
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 0: character maps to <undefined>
pytest tests/create_provider_plugin_test.py also fails on Windows because subprocess.run(..., text=True) decodes the generated script's UTF-8 output with the locale encoding, producing mojibake instead of the expected checkmarks.
Steps to reproduce the issue
- On Windows, open a default
cmd.exe or PowerShell session (code page 1252 / cp1252).
- From a clone:
python scripts/create_provider_plugin.py --help or run the generator as documented.
- Observe
UnicodeEncodeError when the script prints a ✓ / ✅ status line.
- Alternatively:
pytest tests/create_provider_plugin_test.py — 15 failures on Windows before a UTF-8 stdout/stderr reconfigure.
Any additional content
Describe the overall issue and situation
On Windows,
scripts/create_provider_plugin.pyand thetest_plugin.pyit generates print Unicode checkmarks (✓/✅). Windows consoles default stdout/stderr to a legacy code page (typically cp1252), so both scripts crash withUnicodeEncodeErrorbefore the plugin can be generated or verified.This is the same root-cause class as #108, #158, and #166 (Windows cp1252 vs Unicode), which were fixed for file I/O / HTML export in
io.py. The generator script's console output was not covered.Related to #158 (6 👍; already-fixed HTML/file I/O case). This issue is the remaining console-output path.
Expected behavior
python scripts/create_provider_plugin.py ...and the generatedtest_plugin.pyprint status lines successfully on a default Windows console.Actual behavior
pytest tests/create_provider_plugin_test.pyalso fails on Windows becausesubprocess.run(..., text=True)decodes the generated script's UTF-8 output with the locale encoding, producing mojibake instead of the expected checkmarks.Steps to reproduce the issue
cmd.exeor PowerShell session (code page 1252 / cp1252).python scripts/create_provider_plugin.py --helpor run the generator as documented.UnicodeEncodeErrorwhen the script prints a✓/✅status line.pytest tests/create_provider_plugin_test.py— 15 failures on Windows before a UTF-8 stdout/stderr reconfigure.Any additional content