Repository navigation
Conversation
…error handler When a user's Windows profile directory contains non-ASCII characters (e.g. C:\Users\Usuário), child Python processes spawned via sys.executable default to the ANSI code page (cp1252) rather than UTF-8. Under -X utf8 in parent runners, subprocess.run(text=True) reader threads encountered UnicodeDecodeError on byte 0xe1, resulting in None stdout and crashes in splitlines() and string concatenation. Explicitly pass -X utf8 to child lifter invocations, decode subprocess output with encoding='utf-8' and errors='replace', and add UTF-8 encoding declarations to manifest and registration file I/O.
Owner
|
Thanks a lot, @ESp3cter, and sorry for the overlap: I only saw this PR after pushing the same fix to gowa in 9c48171. It starts the lifter in the tool's own mode ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves rigaz29/Ascension-R#41.
Problem
When building on Windows where the user profile directory contains accented or non-ASCII characters (e.g. \C:\Users\Usuário...), child Python processes spawned via \sys.executable\ without explicit UTF-8 flags default to the system's ANSI code page (cp1252 in PT-BR, Western European languages, etc.).
When the parent process runs with -X utf8\ (as in Ascension-R's Kit / \gowa.py), \subprocess.run(..., capture_output=True, text=True)\ uses Python's internal _readerthread\ configured for UTF-8 decoding. When the child process outputs byte \