-
Notifications
You must be signed in to change notification settings - Fork 158
Blob.download_as_text does not decode properly #319
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
Labels
api: storage
Issues related to the googleapis/python-storage API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
@kornholi Thanks for the report! I agree with your assessment that the |
tseaver
added a commit
that referenced
this issue
Nov 24, 2020
Explicit 'encoding' overrides the fallback. Use the 'charset' param of 'content_type', rather than 'content_encoding', which isn't going to be a Unicode -> bytes encoding. Closes #319.
tseaver
added a commit
that referenced
this issue
Nov 24, 2020
Explicit 'encoding' overrides the fallback. Use the 'charset' param of 'content_type', rather than 'content_encoding', which isn't going to be a Unicode -> bytes encoding. Closes #319.
cojenco
pushed a commit
to cojenco/python-storage
that referenced
this issue
Oct 13, 2021
…oogleapis#326) Explicit 'encoding' overrides the fallback. Use the 'charset' param of 'content_type', rather than 'content_encoding', which isn't going to be a Unicode -> bytes encoding. Closes googleapis#319. Also, rewrap long param descriptions for in-source readability.
cojenco
pushed a commit
to cojenco/python-storage
that referenced
this issue
Oct 13, 2021
…oogleapis#326) Explicit 'encoding' overrides the fallback. Use the 'charset' param of 'content_type', rather than 'content_encoding', which isn't going to be a Unicode -> bytes encoding. Closes googleapis#319. Also, rewrap long param descriptions for in-source readability.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: storage
Issues related to the googleapis/python-storage API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Blob.download_as_text
tries to use thecontent-encoding
header to decode the bytes. In most cases that value isgzip
, even though the bytes were already decompressed at that point. In other cases, e.gtext/plain; charset=utf-8
, the value does not make sense to Python'sbytes.decode
.I don't think we can be smarter here than passing through the
encoding
kwarg which defaults to utf-8.The text was updated successfully, but these errors were encountered: