Pelmen napisał(a):
> but socket will raise an exception if it'll be in cp1251
I am not a socket programming expert, but I didn't notice anything
strange when sending utf-8 or latin2 texts over sockets.
--
Jarek Zgoda
http://jpa.berlios.de/
--
http://mail.python.org/mailman/listinfo/python-list
but socket will raise an exception if it'll be in cp1251
--
http://mail.python.org/mailman/listinfo/python-list
Pelmen napisał(a):
> as i understood, better way is base64 encoding on my side, and decoding
> on server side?
No, just encode the texts in what encoding the other side expects. If
this should be CP1251, not decoding would be enough.
--
Jarek Zgoda
http://jpa.berlios.de/
--
http://mail.python.
thanks ... it seems to me best way will be b16encode, to prevent sax
parser errors
--
http://mail.python.org/mailman/listinfo/python-list
as i understood, better way is base64 encoding on my side, and decoding
on server side?
--
http://mail.python.org/mailman/listinfo/python-list
Pelmen wrote:
> what to do, to encode it properly? UTF-8?
You're the one sending it through a socket; only you know what the other
side expects.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Could it be /
what to do, to encode it properly? UTF-8?
--
http://mail.python.org/mailman/listinfo/python-list
Pelmen wrote:
> UnicodeEncodeError: 'ascii' codec can't encode characters in position
> 161-168: ordinal not in range(128)
>
> How can i force this problem.
The problem is that you're trying to write a Unicode string to a socket.
In order to do that properly, you have to encode it to a string