I know it will work in python file with # coding: utf-8 on top.

But it would be great if i could do it in templates, in many cases
moving it in controller would be a bit overhead.


On Jun 14, 8:07 pm, Ken <[email protected]> wrote:
> take it to the python file, like:
> # test.py
> ...
> a = [u"один", u"два", u"три"]
> render.test(a)
>
> 2010/6/14 andrei <[email protected]>
>
>
>
>
>
> > This raises UnicodeDecodeError:
>
> > test.py:
>
> >    import web, os
> >    render =
> > web.template.render(os.path.abspath(os.path.dirname(__file__)))
> >    render.test()
>
> > test.html:
>
> >    $var array = ["один","два","три"]
> >    $ test = "текст"
> >    <p>just a test</p>
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "web.py" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected] <webpy%[email protected]>.
> > For more options, visit this group at
> >http://groups.google.com/group/webpy?hl=en.
>
> --
> 百才招聘(baicai.com).产品部
> Email: [email protected]
> Gtalk: [email protected]
> twitter.com/qichangxinghttp://blog.hi0791.com

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to