From: "Walter Cruz" <walter....@gmail.com>
Date: Sun, 1 Jul 2007 11:27:38 -0300
Local: Sun 1 July 2007 15:27
Subject: Re: How do I set my form to be a unicode string?
Well, I asked before search the in the list archives!
What I needed: tmpl_options['mako.input_encoding'] = 'UTF-8' In environment.py I changed my formencode validator to: UnicodeString and now it's ok. But I'm with a doubt: Even with this, in my templates I've to use: ${h.link_to(u"Nova citação", h.url(action="new"))} (Note the u before "Nova citação"). How can I configure this to avoid to say that this is string is unicode? []'s On 7/1/07, Christoph Haas <em...@christoph-haas.de> wrote: > On Sat, Jun 30, 2007 at 11:55:25AM -0300, Walter Cruz wrote: > > <type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode > Depends on where that error occurs. Can you post a complete traceback? > > How do I set the form to be unicode? > Use the > # -*- coding: utf-8 -*- > preamble in the first line of your templates. > Christoph You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||