I'm planning on writing a callout wrapper for setenv. Callout works within the same process so it should work.

I need to run Ensemble Service with special environment variables set, so it's current process for me.

You can use Apache POI library (or call PS, but cursory googling shows that Word is a requirement via COM objects) for example to get this information. As for how explorer gets doc info - I have honestly no idea.

Docker for windows allows switching between Linux containers and native Windows containers; if you want to use Linux containers (i.e. IRIS), make sure you enabled that mode

See this section in the documentation.

Looks like a locale problem.

Add to the beginning of the script:

import locale
locale.setlocale(locale.LC_ALL, 'en_US.utf8')