Andrew Veitch wrote at 2006-3-20 01:53 +:
...
input name=blah type=text tal:attributes=value python:chr
(200).encode('utf-8') /
This gives:
Error Type: UnicodeDecodeError
Error Value: 'ascii' codec can't decode byte 0x80 in position 0:
ordinal not in range(128)
Sure, you are using
Andrew Veitch wrote:
Error Type: UnicodeDecodeError
Error Value: 'ascii' codec can't decode byte 0x80 in position 0: ordinal
not in range(128)
If I change the input line to:
input name=blah type=text tal:attributes=value python:chr(200) /
Then this will work in HTML mode but will fail in
Andrew Veitch wrote at 2006-3-18 15:56 +:
I'm just trying to think of a way of using tal:attributes with non-
ASCII characters using the XML parser.
At first, I just used a straight tal:attributes with the encoding of
the template set to UTF-8 but that threw an expat error.
This means
On 19 Mar 2006, at 19:11, Dieter Maurer wrote:
This means that almost surely your non-ascii was not encoded
in UTF-8. Encode them this way and it will work.
Here's a test template that I created through the ZMI:
?xml version=1.0 encoding=utf-8?
html