UnicodeEncodeError: 'charmap' codec can't encode characters in position 9-13: character maps to <undefined>
I tried to convert a docx file to md fil, but i got this error
UnicodeEncodeError: 'charmap' codec can't encode characters in position 9-13: character maps to
I've submitted a fix for this issue in PR #1856. The fix wraps print() calls in try/except blocks to handle UnicodeEncodeError gracefully on Windows terminals with charmap codec.
Thank you for reporting this! The CLI output-encoding crash was addressed in #1149, and the fix is included in v0.1.8. I checked the current CLI with GBK, CP950, and CP1252 output encodings.
Please upgrade to markitdown 0.1.8 and use markitdown input.docx -o output.md (substituting your input filename) when saving output: -o writes UTF-8 and preserves characters that a legacy console encoding cannot represent. Redirecting console output with > can still replace unsupported characters.
Closing this as addressed for the reported CLI crash. If it still occurs with the current release, please feel free to reopen with your version, command, full traceback, and a small sample if available.