I've got it:

name=name.encode('UTF-8')

On 3 jul, 13:34, [EMAIL PROTECTED] wrote:
> I am having quite a bad time with the type encoding. (using spanish
> accents). In order to get the string literals working I convert them
> to unicode without problems (I first had to figure out that this is
> necessary).
> Thist works:
>         flash(u"Proveedor %s añadido." % name)
> This doesn't work (because of the ñ)
>         flash("Proveedor %s añadido." % name)
>
> The following works as long as the name doesn't contain any accents:
> def add(self, name):
>     provider = model.Provider(name=name)
>
> How do I get this working for the whole character set including é, è,
> ñ, etc.?


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to