gabrieldemarmiesse / python-on-whales

An awesome Python wrapper for an awesome Docker CLI!
MIT License
537 stars 100 forks source link

Replace unrecognised unicode characters rather than raising an exception #607

Closed LewisGaul closed 1 month ago

LewisGaul commented 1 month ago

Fixes https://github.com/gabrieldemarmiesse/python-on-whales/issues/606

Note that this still isn't ideal - if someone has a container expected to have output in an encoding other than unicode then special characters will all be replaced... It might be good to support the user passing encoding and errors through (much like subprocess.run()), but for now this seems like an improvement at least.

LewisGaul commented 1 month ago

I raised https://github.com/gabrieldemarmiesse/python-on-whales/issues/608 to track the enhancement of allowing the user to specify encoding.