[Twisted-web] liveevil and unicode

Dave Cook daverz at gmail.com
Mon Mar 7 02:23:40 MST 2005


Has anyone had any success sending unicode back and forth between
client and server (using nevow 0.3).  I'm testing with the simple
liveevil.py example:

from nevow import liveevil, inevow, tags, rend, loaders
from twisted.internet import reactor
reactor.listenTCP(8080,
liveevil.LiveSite(rend.Page(docFactory=loaders.stan(tags.html[tags.head[liveevil.glue],
tags.body[ tags.input(type="text", onchange=liveevil.handler(lambda
client, text: client.alert(text), "node.value"))]]))))
reactor.run()

Either the server doesn't understand the input from Firefox, or in the
case of Safari, send back garbage.

A good example of the kind of character I want to send is:

č

U+010D LATIN SMALL LETTER C WITH CARON

General Character Properties

Unicode category: Letter, Lowercase
Canonical decomposition: U+0063 LATIN SMALL LETTER C + U+030C COMBINING CARON

Various Useful Representations

UTF-8: 0xC4 0x8D
Octal escaped UTF-8: \304\215
Decimal entity reference: č

Thanks,
Dave Cook



More information about the Twisted-web mailing list