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

Enhance filters.Decode unicode handling #47

Closed
sqlalchemy-bot opened this issue Jun 28, 2007 · 2 comments
Closed

Enhance filters.Decode unicode handling #47

sqlalchemy-bot opened this issue Jun 28, 2007 · 2 comments
Labels
bug Something isn't working low priority runtime

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Anonymous

Right now, even when using filters.decode.utf8, it's possible to get str object after filter - when using some object which is not instance of basestring.

For example when using Mako with Django oldforms, Mako will crash on something like

${ form['country'] }

Because form['country'] is a !FormFieldWrapper instance, and it doesn't get decoded by filter.decode.utf8.

So here's the small patch that will decode using given encoding even not basestring objects after converting object to string using str().


Attachments: decode.diff

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

[changeset:297]

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority runtime
Projects
None yet
Development

No branches or pull requests

1 participant