On 11/29/05, Olli Wang <[EMAIL PROTECTED]> wrote: > there's a tag like <input type="textbox" name="test"/> in my kid. > when i type english in the textbox, it can be passed correctly, but > when i type Chinese, it raise a traceback: > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: > ordinal not in range(128) > there's already <meta content="text/html; charset=UTF-8" > http-equiv="content-type" py:replace="''"/> in my kid, too. > > further, there's embedding python code like this: > <?python > test2='blahblahblah' > ?> > when i type Chinese to replace the test2's value, it couldn't display > correctly, too. > > how could I solve these encoding problem? thanks.
TurboGears 0.9 has a kid.encoding configuration variable you can use to set an appropriate encoding (utf8 is the default). In your example above, however, you're just running raw Python. Did you try test2=u'your Chinese text' Kevin -- Kevin Dangoor Author of the Zesty News RSS newsreader email: [EMAIL PROTECTED] company: http://www.BlazingThings.com blog: http://www.BlueSkyOnMars.com

