Dears
First, I'm sorry my broken english.
I need help about latin encoding with tgwebservices. I've a working
frontend using ajax, html, and javascript soap client with a
Turbogears + TGwebservices backend. But every time I enter a text with
characters like "ç", "á", "õ" (latin 1 encoding) I get a severe error
on server side. All services (more than 50) are working well when the
user enter a non-latin text.I've tried several workarrounds with no
success.
Thanks in advance
Unrecoverable error in the server.
===First Error===
Page handler: <bound method SoapController.index of
<tgwebservices.soap.SoapController object at 0x8c7314c
>>
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/cherrypy/_cphttptools.py",
line 105, in _run
self.main()
File "/var/lib/python-support/python2.5/cherrypy/_cphttptools.py",
line 254, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in index
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
turbogears/controllers.py", line
344, in expose
*args, **kw)
File "<string>", line 5, in run_with_transaction
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
turbogears/database.py", line 312
, in so_rwt
retval = func(*args, **kw)
File "<string>", line 5, in _expose
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
turbogears/controllers.py", line
359, in <lambda>
mapping, fragment, args, kw)))
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
turbogears/controllers.py", line
386, in _execute_func
output = errorhandling.try_call(func, *args, **kw)
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
turbogears/errorhandling.py", line
72, in try_call
return func(self, *args, **kw)
File "/usr/lib/python2.5/site-packages/TGWebServices-1.1.2-py2.5.egg/
tgwebservices/soap.py", line 212
, in index
output = method(**params)
File "/usr/lib/python2.5/site-packages/TGWebServices-1.1.2-py2.5.egg/
tgwebservices/controllers.py"
, line 88, in newfunc
kw = iconv.handle_xml_params(kw["xml_body"], input_types)
File "/usr/lib/python2.5/site-packages/TGWebServices-1.1.2-py2.5.egg/
tgwebservices/iconv.py", line
75, in handle_xml_params
kw[param] = _get_single_value(elem, itype)
File "/usr/lib/python2.5/site-packages/TGWebServices-1.1.2-py2.5.egg/
tgwebservices/iconv.py", line
48, in _get_single_value
text, None)
Invalid: <unprintable Invalid object>
===Second Error===
Page handler: 'ordinal not in range(128)'
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/cherrypy/_cphttptools.py",
line 425, in handleError
_cputil.get_special_attribute('_cp_on_error', '_cpOnError')()
File "/usr/lib/python2.5/site-packages/TGWebServices-1.1.2-py2.5.egg/
tgwebservices/soap.py", line 153
, in _cp_on_error
faultstring.append(str(e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in
position 0: ordinal not in range
(128)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---