thearchitector / tee-subprocess

A subprocess replacement with tee support for both synchronous and asynchronous contexts.
MIT License
7 stars 0 forks source link

Decoding of output uses only utf-8 #2

Open JosuaCarl opened 1 month ago

JosuaCarl commented 1 month ago

Hi, while working with your tee implementation, I noticed, that the encoding="..." option it was not available in the runmethod.

I later stumbled into an error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 11809: invalid start byte and was unable to change the encoding to match my expected output. I set text=False, which deals with it for now, but an encoding option would be great.

See: https://github.com/thearchitector/tee-subprocess/blame/6b16278de369e51df45b47b8d2fc49f56784fa20/tee_subprocess/subprocess.py#L218

thearchitector commented 4 weeks ago

thanks for catching that discrepancy! i can definitely introduce this when i get a chance towards the middle of November