Das sieht ehr nach einem Unicodeproblem aus. Auf jedenfalls ist es möglich 8-bit Strings über eine Socket zu schicken....jedenfalls oft genug implementiert und erprobt. Könnte auch ein Problem in den TK Modulen sein. Das normale Socketmodul jedenfall funzt. -aj --On Donnerstag, 20. November 2003 15:14 Uhr +0100 Olaf 'Ruebezahl' Radicke <olaf_rad@gmx.de> wrote:
Am Don, 2003-11-20 um 14.31 schrieb Andreas Jung:
Wieso können Socken keine Umlaute übertragen?
Bitte Code und Traceback zeigen...vorher glaub ich das nicht.
Hier zwei versuche. In der ersten Zeile steht der String der übergeben werden soll:
String: <?xml version="1.0" encoding="ISO-8859-1"?> <set_projekt_ziel projekt_titel="prob-umlaut">üöä</set_projekt_ziel> Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__ return self.func(*args) File "/home/olaf/Documents/src/gnuswork/sandbox/tk_gnuswork/gui_project_new.py ", line 190, in _ok self.netz.set_projekt_ziel(project_title, projekt_ziel) File "/home/olaf/Documents/src/gnuswork/sandbox/tk_gnuswork/netmodul.py", line 44, in set_projekt_ziel self.my_socket.send(unicode(commant,"Latin-1").encode("utf-8")) TypeError: decoding Unicode is not supported
##########################################
String: <?xml version="1.0" encoding="ISO-8859-1"?> <set_projekt_ziel projekt_titel="prob-x">äöü</set_projekt_ziel> Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__ return self.func(*args) File "/home/olaf/Documents/src/gnuswork/sandbox/tk_gnuswork/gui_project_new.py ", line 190, in _ok self.netz.set_projekt_ziel(project_title, projekt_ziel) File "/home/olaf/Documents/src/gnuswork/sandbox/tk_gnuswork/netmodul.py", line 45, in set_projekt_ziel self.my_socket.send(commant) UnicodeEncodeError: 'ascii' codec can't encode characters in position 85-87: ordinal not in range(128)
_______________________________________________ Python-de maillist - Python-de@python.net http://python.net/mailman/listinfo/python-de