"Bruno Silva" <[EMAIL PROTECTED]> writes:
> I have all in UTF-8, I think the problem is when i'm filling text in the
> form, I'm typing in ISO-8859-1, and the browser post's the string that way,
> so I'm guessing that's why the to_utf8 function works, but then, when I
> display the result it appears messed up.
As I said, use *everything* in UTF-8. If you tell the browser the contents of
the page are encoded in UTF-8, then it should do the right thing.
> This is very annoying, look what is happening now.
> With this code:
> p = Project(name=project_name, user=user)
> turbogears.flash("Project %s added!" % project_name)
> I insert 'cão' in the form, and the result is:
> Project cão added!
> With this:
> p = Project(name=project_name, user=user)
> turbogears.flash("Project %s added!" % p.name)
> the result is:
> Project cão added!
As expected, since you're going from UTF-8 to ISO-8859-1.
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---