-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't print bytes with non-ascii encoding #192
Comments
+1 |
FurcyPin
added a commit
to FurcyPin/bigquery-frame
that referenced
this issue
Sep 4, 2022
from_base32 and from_base64 will be added later, as the tabulate library suffers from a display bug at the moment. astanin/python-tabulate#192
FurcyPin
added a commit
to FurcyPin/python-tabulate
that referenced
this issue
Sep 5, 2022
FurcyPin
added a commit
to FurcyPin/bigquery-frame
that referenced
this issue
Sep 5, 2022
from_base32 and from_base64 will be added later, as the tabulate library suffers from a display bug at the moment. astanin/python-tabulate#192
I made a pull request to fix the issue. |
FurcyPin
added a commit
to FurcyPin/bigquery-frame
that referenced
this issue
Sep 13, 2022
from_base32 and from_base64 will be added later, as the tabulate library suffers from a display bug at the moment. astanin/python-tabulate#192
astanin
added a commit
that referenced
this issue
Oct 6, 2022
fix #192 - Can't print bytes with non-ascii encoding
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example:
Currently, an UnicodeDecodeError will be raised:
Related code is here:
python-tabulate/tabulate.py
Line 1070 in 3f0757e
As I understand it, an UnicodeDecodeError should be caught instead of a TypeError, right?
So output would be like:
I'm not sure if it's the designed behavior, but i think it's a proper way to handle non-ascii bytes.
Furthermore, why not return all bytes as str(val) directly without trying to return str(val, "ascii") at first? If the caller want to print decoded value, they can decode it explicitly before calling tabulate().
The text was updated successfully, but these errors were encountered: