Unicode Fix for Blob Fields #124

wants to merge 16 commits into


None yet

3 participants


Hi Rob, I've got a fix for this issue: http://stackoverflow.com/questions/4350028/

I added a clean_params method that replaces any non-unicode strings with a placeholder so that 1) it still looks good on the sql panel and 2) the foce_unicode no longer causes an error.

Matthew J Mo... added some commits Dec 8, 2010
Matthew J Morrison added clean_params method to DatabaseStatTracker to scrub non-unicode…
… data for displaying on the sql panel
Matthew J Morrison changed version to dev 278d70a

That looks pretty good. 2 things... 1) I'd like to not have force_unicode called twice on params, and 2) I'd like to add a test for this. There are no tests yet so I'd be happy to add this.



I can write some tests and do some refactoring so force_unicode isn't called twice. Thanks.


I did some refactoring so that force_unicode is only called once. I didn't add any tests yet, because I wasn't sure where you would like them. Would you like me to just write some tests and put them in a tests package somewhere, or do you have something in mind as far as where you want your tests for the panels to be located?


Thanks Matt. I didn't have anything in mind for tests, but know that this will be the first one (of many, I hope) and so the decision might be a bit harder. I'd look to other projects with tests and follow a similar pattern. We can always shuffle them around later if we need to. Much appreciated.


Hi Rob, I added some tests for my change. I used the mock library to make creating the unicode decode error happen more easily.


As explained in #123 I believe this issue is fixed.

The debug toolbar could probably use a systemic effort to review how arbitrary objects are converted to text and how exceptions are handled. However, this pull request is very outdated and isn't a good starting point.

Thanks for your contribution and sorry for dropping the ball. We appreciate your efforts.

@aaugustin aaugustin closed this Oct 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment