Issue 195: Bad encoding on receiving offline messages:
Status:  New
Owner: ----
Reported by Mur...@gmail.com, Nov 5, 2009
My config is:

<pyicqt>
        <jid>xxx.ru</jid>
        <mainServer>127.0.0.1</mainServer>
        <mainServerJID>xxx.ru</mainServerJID>
        <website>http://xxx.ru/</website>
        <port>5347</port>
        <secret>xxx</secret>
        <lang>ru</lang>
        <encoding>cp1251</encoding>
        <icqServer>login.oscar.aol.com</icqServer>
        <icqPort>5190</icqPort>
        <admins>
        <jid>murz@xxx.ru</jid>
        </admins>
        <xdbDriver>xmlfiles</xdbDriver>
        <detectunicode>1</detectunicode>
        <usemd5auth/>
</pyicqt>

Sender sends me the message:
Привет! Как ваши дела?
Таня на когда нас пригласила? На суботу или на воскресенье? В 15-00?

I receive:
‡⃪㿠਍਍■⃠⃠⃱‿⃳⃨‿⃂㔱〭㼰

When I talking with him online, all messages sends and receives normally.

My clients are Kopete and Pidgin, on Kubuntu. Sender have QIP 2005.

What can I change in settings for solve this issue? Or how I can decode
received message?
Nov 5, 2009
#1 Mur...@gmail.com
Another tests:
Sent:
Test 123
test second

Received:
We have received text in unsupported encoding.
'Test 123\r\ntest second'
 
Sent:
Тест ??? раз два

Received:
Тест ??? раз два

Sent:
Тест первая строчка!
Тест? вторая строчка
test 3 stroka

Received:
We have received text in unsupported encoding.
'\xd2\xe5\xf1\xf2 \xef\xe5\xf0\xe2\xe0\xff
\xf1\xf2\xf0\xee\xf7\xea\xe0!\r\n\xd2\xe5\xf1\xf2? \xe2\xf2\xee\xf0\xe0\xff
\xf1\xf2\xf0\xee\xf7\xea\xe0\r\ntest 3 stroka'

I think the bug is only when received multiline messages.
Nov 11, 2009
Project Member #2 r000ns...@gmail.com
PyICQt retrieving offline messages from AOL server "as is". Unfortunately, encoding
isn't specified and we can only try to detect it. It's not a best solution but works
in most cases. ICQ clients should supports offline messages in unicode to really
solve this problem
QIP 2005 build 8080 and higher supports "/unioff" command-line key to send offline
messages in Unicode
Nov 11, 2009
#3 Mur...@gmail.com
One-line messages received succesfully with correct encoding.
But in multiline messages encoding is bad. 
Maybe detection of encoding in multiline messages works wrong?

Can I set the priority of encoding for detection, or limit available encodings by 2-3
usable by me (only cp1251 and utf-8, for example)?