Skip to content
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

Queries with unicode in query name fails downloading result file #4332

Closed
arikfr opened this issue Nov 4, 2019 · 1 comment · Fixed by #4498
Closed

Queries with unicode in query name fails downloading result file #4332

arikfr opened this issue Nov 4, 2019 · 1 comment · Fixed by #4498

Comments

@arikfr
Copy link
Member

arikfr commented Nov 4, 2019

This just happened on deploy preview. Sentry error:
https://sentry.io/share/issue/b8268b7c97784a30b67c512332a8d779/

Some possible solutions:

  1. Implement a solution similar to Fix send_file's attachment_filename to work with non-ascii filenames pallets/flask#2223.
  2. Switch to using Flask's send_file method instead of handling this on our own (need to make sure that we always have a file-like object at hand and that the behavior consistent with our current one).
  3. Try quoting the filename, as suggested here: UnicodeEncodeError: 'ascii' codec can't encode characters in position 151-165: ordinal not in range(128) benoitc/gunicorn#1214 (comment).

3 is the simplest, 2 is probably the most future proof.

@arikfr arikfr added this to the v9 milestone Nov 4, 2019
@jezdez
Copy link
Member

jezdez commented Nov 4, 2019

+1 on (2)

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

Successfully merging a pull request may close this issue.

2 participants