Skip to content

Conversation

@timohencken
Copy link

see issue open parameter "errors" should be error handler, not encoding #226

Hi,

I stumbled upon a bug in stdout decoding when running your lib against an SQL Server configured to German and returning "öß".

At following point of code, an error handling method needs to be specified, not an encoding:

errors="utf-8",

    proc = Popen(
        cmd,
        stdout=PIPE,
        stderr=STDOUT,
        encoding="utf-8",
-       errors="utf-8",
+       errors="replace",
        shell=with_shell,
    )

see https://docs.python.org/3/library/io.html#io.TextIOWrapper for reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant