It is a mojibake problem.
Deep inside some system variables will report the system encoding as X (usually cp1252 - a close cp to "latin1") - and either Python streaming decoder or exiftool will assume that - but then, in some other config variable, the terminal encoding is reported as being some other encoding (like CP437, or CP852, depending on Windows language).
I just run an example here, with a bat script that would output "Alô mundo" and it was read as "Al“ mundo!" on the cmd terminal, using subprocess.run
.
What I had to do is to re-encode this to bytes using "cp1252" and then decode it using the CP reported in my CMD configuration (I had to check that in the cmd
preferences dialog - from Python it would not show up in none of the three sys.get*encoding
methods, neither the encoding of sys.stdout - all 4 would report "utf-8").
Note that I have a tag badge for "unicode" due to answering encoding questions like this, and I have a grasp of the underlying mechanisms...but Windows supporting partially the 40+ year old legacy for its terminal, while trying to use latin1 for the UI and utf-8 for the dev. environment is too much to wrap ones head around in a deterministic way.
I digress; try the code bellow, if that does not work, look for the CP encoding of your CP instead of CP437 (pycharm is likely replicating some of this enviroment to its subprocesses):
output = subprocess.run(["exiftool", "-j", image_path], capture_output=True, text=True, check=True).stdout
corrected_output = output.encode("cp1252").decode("cp437")
print(corrected_output)