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

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Jun 28, 2007

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

This comment has been minimized.

sqlalchemy-bot commented Jun 29, 2007

Michael Bayer (@zzzeek) wrote:

[changeset:297]

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jun 29, 2007

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