pysoem
pysoem copied to clipboard
UnicodeDecodeError raised by umlauts in adapter drescription.
https://github.com/bnjmnp/pysoem/blob/fbf7d8abc855454c0f2589d277e0830d1255ba8d/pysoem/pysoem.pyx#L80
Hello @bnjmnp,
when I call the find_adapters-function I get an UnicodeDecodeError exception, because of umlauts in the adapter drescription. The adapter description might be encoded in ansi.
Is it possible to remove these decode calls of name and adapter description? or make the encoding parameterizable, because of downward compatibility?
Thank you
Greetings from Langebrück ;)
Hi @Werdf,
Thank you for this.
I guess I have expected the description to be in pure ASCII. But yes, it makes sense to return name and description as a byte array. I will figure out a solution for this.
It has bin a while, I actually solved this already in version 1.1.0. The description is now a raw byte array, so the decoding is up to the user. The name will still be decoded with the hope that no one uses non-ASCII characters there.