-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Safely decode non-ascii SQL queries for display
SQL queries containing non-ascii byte strings would cause errors, both with and without Pygments highlighting. This updates the non-Pygments case to handle a simple decoding to ensure the value is ascii-safe. It also removes passing an explicit "utf-8" encoding to Pygments, since this causes errors when the bytes are not utf-8. When the encoding is omitted, Pygments will default to "guess" the encoding by trying utf-8 and falling back to latin-1. Fixes #55
- Loading branch information
Showing
4 changed files
with
94 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ envlist = py26,py27,py34 | |
deps = | ||
pytest | ||
Flask-SQLAlchemy | ||
Pygments | ||
commands = | ||
py.test |