Can I force a language when creating processes on Windows?

The problem: When this ImageMagick command is invoked on a Chinese language Windows installation no output is generated to the console:

(The reason for this question's Python tag will come up later, I promise.)

magick convert IMAGE.PNG -filter point -scale 100% -define histogram:unique-colors=true -format %c histogram:info:-

On my English language windows I get the expected output, here is a small subsample:

46530: (204,204,204) #CCCCCC srgb(204,204,204)
57552: (205,205,205) #CDCDCD srgb(205,205,205)
65966: (206,206,206) #CECECE srgb(206,206,206)

The ImageMagick versions match on both machines:

Version: ImageMagick 7.0.7-28 Q16 x64 2018-03-25 Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC License: Visual C++: 180040629

Features: Cipher DPC Modules OpenMP Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr openexr pangocairo png ps raw rsvg tiff webp xml zlib

What I've tried that did not work:

Using the cmd console window:

  1. Setting the console font to Consolas from the Chinese font.
  2. Changing the code page using chcp to 65001 (and one in the 400's which I didn't write down before disconnecting from the Chinese server.)
  3. Doing both at the same time
  4. Piping the console output to a file.
  5. I can run a straight convert command to convert the .png to a .tif and it works. So Image Magick is seeing the file.


This may be an Image Magick localization bug. However my users never see the output of the command. The command is invoked by a basic python subprocess call:

proc = subprocess.Popen(entry.cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, *entry.args, **entry.kwargs)

Python consumes the process output.


Can I tweak the process creation from Python in such a way that the Image Magick command produces output regardless of language?

My thought is to force the process to use UTF-8, but I'm not sure how to go about that after some searching. The user does have an English language pack installed.

Thanks for any insights.