I have a submit button with value in Chinese string, some thing like:
 <input type="submit" name="form.submitted" value="提交" />

and chameleon zpt render gives me the following error:

  File
"d:\tglist\lib\site-packages\chameleon-1.0-py2.5.egg\chameleon\core\clauses.py",
line 696, in begin
    value = utils.escape(value, '"', 'ascii')
  File
"d:\tglist\lib\site-packages\chameleon-1.0-py2.5.egg\chameleon\core\utils.py",
line 179, in escape
    string = re_numeric_entity.sub(substitute, string)
  File
"d:\tglist\lib\site-packages\chameleon-1.0-py2.5.egg\chameleon\core\utils.py",
line 176, in substitute
    return '&%s;' % htmlentitydefs.codepoint2name[code]
KeyError: 21704

But if I pass the string to template from python (define it as u'xxxx') it
works fine. Is there any way I can use the Chinese string directly in the
zpt?
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to