I think that you should change your model definition to use UnicodeCols:

class Page(SQLObject):
    pagename=UnicodeCol(alternateID=True, length=30)
    data=UnicodeCol()

I haven't tested so I could be wrong... Try ;)

Hope it helps,
Alberto

On Feb 6, 2006, at 11:42 AM, Alexei Vinidiktov wrote:


Hello.

I'm new to TurboGears. I've just finished the tutorial. Everything seems to work just fine with Latin characters. I can also create wiki pages in Russian, but I can't edit them.

Here's the error I get when I hit on the "Edit this page" link.

500 Internal error
Server got itself in trouble

Traceback (most recent call last):
File "d:\python24\lib\site-packages\CherryPy-2.1.0-py2.4.egg \cherrypy\_cphttptools.py", line 271, in run
    main()
File "d:\python24\lib\site-packages\CherryPy-2.1.0-py2.4.egg \cherrypy\_cphttptools.py", line 502, in main
    body = page_handler(*args, **cherrypy.request.paramMap)
File "d:\python24\lib\site-packages\TurboGears-0.8a5-py2.4.egg \turbogears\controllers.py", line 122, in newfunc
    return controllers._process_output(tg_format, output, html)
File "d:\python24\lib\site-packages\TurboGears-0.8a5-py2.4.egg \turbogears\controllers.py", line 38, in _process_output
    output = view.render(output, tg_format, template=template)
File "d:\python24\lib\site-packages\TurboGears-0.8a5-py2.4.egg \turbogears\view.py", line 99, in render return t.serialize(encoding="utf-8", output=format, fragment=fragment) File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \__init__.py", line 232, in serialize
    return serializer.serialize(self, encoding, fragment)
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \serialization.py", line 51, in serialize
    text = list(self.generate(stream, encoding, fragment))
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \serialization.py", line 319, in generate
    for ev, item in self.apply_filters(stream):
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \serialization.py", line 77, in balancing_filter
    for ev, item in stream:
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \pull.py", line 203, in _coalesce
    for ev, item in stream:
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \filter.py", line 21, in transform_filter for ev, item in apply_matches(stream, template, templates, apply_func): File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \filter.py", line 31, in apply_matches
    item = stream.expand()
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \pull.py", line 95, in expand
    for ev, item in self._iter:
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \pull.py", line 164, in _track
    for p in stream:
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \pull.py", line 211, in _coalesce
    text += to_unicode(value, encoding)
File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid \pull.py", line 187, in to_unicode
    return unicode(value, encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)



--
Best regards,
Alexei Vinidiktov



Reply via email to