Some updates on weirdness. I've been playing around in the
interpreter...

>>> import kid
print
kid.Template(source='<div>&nbsp;</div>').serialize(encoding='ascii',output='html')
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<DIV>&#160;</DIV>

Ok, so that output is what I expected to see...but i don't want ascii
encoding, and that's not even an option in app.cfg

If I try this, however, I get an error which indicates that there is
the same byte appearing in the output as is showing up in my rendered
page (as might be expected....but it's good to confirm)

>>> unicode(kid.Template(source='<div>&#0160;</div>').serialize(encoding='utf-8',output='html'))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
108: ordinal not in range(128)

All I want to do is include an &nbsp; in my widget's template. Can
someone please help?


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to