markitdown icon indicating copy to clipboard operation
markitdown copied to clipboard

Fix exiftool JSON decoding to use UTF-8

Open Vedant43hh opened this issue 5 months ago • 0 comments

Description

ExifTool always outputs JSON in UTF-8, but exiftool_metadata() decoded the output using locale.getpreferredencoding(False).

On systems where the locale encoding is not UTF-8 (for example Windows cp936/GBK), this can raise UnicodeDecodeError when metadata contains non-ASCII characters.

This PR decodes the JSON output explicitly as UTF-8.

Fixes #1972

Vedant43hh avatar Jun 04 '26 04:06 Vedant43hh