CodeWiki
CodeWiki copied to clipboard
Non-UTF-8 encoded Chinese characters in subprocess output on Windows cause a crash.
In codewiki's str_replace_editor.py, the .decode() calls on subprocess output crash when encountering GBK-encoded Chinese characters on Windows.
I’m seeing a similar issue on Windows: when CodeWiki reads or writes files using Python’s open() without explicitly specifying encoding="utf-8", it can fail with UnicodeEncodeError or UnicodeDecodeError if the generated documentation contains emojis or other non-ASCII characters.
A possible fix is to use:
open(path, "r", encoding="utf-8", errors="replace") open(path, "w", encoding="utf-8")
Fixed in 3ab1b98.