I checked colorama's problem description. It seems that colorama uses ASCII decoding for stdout,
Invalid unicode string handling
When diff.py is executed, collecting the modified information can work, but ultimately cannot be decoded to stdout. It is assumed here that before colorama init, determine utf-8stdout
if sys.stdout.encoding.lower() != 'utf-8':
sys.stdout = open(sys.stdout.fileno(), mode='w', encoding='utf-8', buffering=1)
I look forward to your reply and point out my mistakes.
UnicodeEncodeError: 'gbk' codec can't encode character '\ufffd' in position 19: illegal multibyte sequence [34980] Failed to execute script 'diff' due to unhandled exception! fatal: external diff died, stopping at dd.xlsm
I checked colorama's problem description. It seems that colorama uses ASCII decoding for stdout, Invalid unicode string handling
When diff.py is executed, collecting the modified information can work, but ultimately cannot be decoded to stdout. It is assumed here that before colorama init, determine utf-8stdout
I look forward to your reply and point out my mistakes.
UnicodeEncodeError: 'gbk' codec can't encode character '\ufffd' in position 19: illegal multibyte sequence [34980] Failed to execute script 'diff' due to unhandled exception! fatal: external diff died, stopping at dd.xlsm