Skip to content

Unicode Fix for Blob Fields #124

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

Closed
wants to merge 16 commits into from

Conversation

mattjmorrison
Copy link

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.

@robhudson
Copy link
Contributor

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.

Thanks.

@mattjmorrison
Copy link
Author

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

@mattjmorrison
Copy link
Author

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?

@robhudson
Copy link
Contributor

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.

@mattjmorrison
Copy link
Author

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

@aaugustin
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants