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

Can't print stack trace containing UTF-8 characters #25

Open
tflorac opened this issue Oct 20, 2015 · 1 comment
Open

Can't print stack trace containing UTF-8 characters #25

tflorac opened this issue Oct 20, 2015 · 1 comment

Comments

@tflorac
Copy link

tflorac commented Oct 20, 2015

Hi,
I use SQLTap and noticed a small problem: if my source code (encoded in UTF-8) contains hard-coded accentuated characters as SQLAlchemy query arguments, an encoding error is raised in Mako template when displaying the trace...
I quickly corrected by typing "${trace.decode('utf-8')}" in "html.mako" template, but this fix is probably not usable for people using other encodings...

@inconshreveable
Copy link
Owner

Hmmm interesting. I wonder whether the trace is encoded in utf-8 regardless of what the sourcefile is in. This will require some additional learning and testing just to understand.

That being said, I'm willing to bet that 99.9% of everyone's source files are in ASCII or UTF-8, so I'd be amenable to taking a patch that assumes UTF-8 just so long as we understand the consequences of what happens if they're not.

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

No branches or pull requests

2 participants