I have a string fetched from database, in iso8859-2, with 8bit characters, and I'm trying to send it over the network, via a socket:

File "E:\Python24\lib\socket.py", line 249, in write
data = str(data) # XXX Should really reject non-string non-buffers
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 123: ordinal not in range(128)


The other end knows it should expect this encoding, so how to send it?

(Does anyone else feel that python's unicode handling is, well... suboptimal at least?)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to