unicode questions
Богун Дмитрий <[email protected]> Mon, 15 Nov 2010 01:39:49 +0200
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <[email protected]> |
Hello. I have some questions about unicode handling into cheetah. The directive "#encoding CODEC" must add "# -*- coding: CODEC -*-" into compilled version of template. But it doen't work. Actually it work, but only for templates compiled by command line tools cheetah-compile. When I compile same template from python module using Cheetah.Compiler.Compiler class it doesn't work. And all non ascii string into compiled template become u'\u0421\u043e \u0437'... It can be fixed? And one more related(may be) issue - while rendering template give this warning: 2010-11-15 01:20:29,390 4216 [ DEBUG:root] Trying to work around a UnicodeDecodeError in getvalue() 2010-11-15 01:20:29,391 4216 [ DEBUG:root] ...perhaps you could fix "% s" while you're debugging What shoul I change to fix it? What info you need to understand what wrong? All templates stored in utf-8. $ cheetah version 2.4.3 $ python --version Python 2.6.5 $ uname -sr Linux 2.6.35-gentoo-r4 ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev