sqltap icon indicating copy to clipboard operation
sqltap copied to clipboard

Can't print stack trace containing UTF-8 characters

Open tflorac opened this issue 10 years ago • 1 comments
trafficstars

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...

tflorac avatar Oct 20 '15 09:10 tflorac

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.

inconshreveable avatar Oct 21 '15 01:10 inconshreveable