Yes, it helped me. I added `export LANG=ru_RU.UTF-8' and `export
LC_ALL=ru_RU.UTF-8' (server locale is ru_RU.KOI8-R) and transport
doesn't generate exception when I add new user to my roster.
But when I add new user, he/she doesn't receive my ICQ authorization
request and isn't added to my ICQ contact list (I remember, in older
versions all users are added to `PyICQ-t buddies' ICQ group). But I'll
test this one more time.

Because of it, I see user in my roster, but he/she is offline (I need
to start ICQ client, e.g. QIP, add user to my ICQ contact list, send
auth. request and grant my authorization, and after this I see user in
my PyICQt as online).

On Jun 14, 1:00 pm, Mike Markley <[email protected]> wrote:
> Python is somewhat notoriously finicky when it comes to handling UTF-8
> strings on non-UTF-8 terminals. I had a similar issue with PyAIMt, and
> the easiest fix turned out to be to set LC_ALL to en_US.UTF-8 (or
> whatever language is more appropriate for you) in my init script for
> the transport. Python will happily convert just about anything to
> UTF-8 when it's told that such output is expected, and as a
> workaround, it works great for me.
>
> Longer-term, I suspect there probably needs to be some additional work
> done around the Python transports to ensure all strings are handled
> appropriately when getting unicode strings from the network (e.g.
> string.encode(charset, 'replace')). I'd have to defer to Python gurus
> better than I on the "right" way to do so, but searching for os.environ
> ['LC_ALL'] and os.environ['LC_CTYPE'] and then falling back on either
> 'ascii' or 'utf-8' is probably a sane approach.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"py-transports" 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/py-transports?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to