| Issue 70: | Russian message to offline client have wrong encoding. | |
| Back to list |
Posted by guest at 2007-07-07 15:52:25
I send russian message to ICQ contact that currently offline. When he goes
online he receive message with broken charset. It's seems that offline message
from me to ICQ contacts always arrived with broken charset
Posted by guest at 2007-07-09 09:31:12
same problem :(
Posted by guest at 2007-07-09 14:08:04
me too =\
Posted by guest at 2007-07-09 14:35:39
Fix for russian only
Find in tlib/oscar.py:
part[0] = part[0].encode('ascii')
charSet = 0x0000
except:
try:
part[0] = part[0].encode('iso-8859-1')
charSet = 0x0003
except:
try:
part[0] = part[0].encode('utf-16be', 'replace')
charSet = 0x0002
and replace with:
part[0] = part[0].encode('ascii')
charSet = 0x0000
except:
try:
part[0] = part[0].encode('cp1251')
charSet = 0x0003
except:
try:
part[0] = part[0].encode('utf-16be', 'replace')
charSet = 0x0002
This is wrong in global case, but works perfectly for a long time.
//zlobnyme
Posted by maxbritov at 2007-07-10 07:16:51
for me, it seems config.encoding better then simple 'cp1251'
I use "part[0] = part[0].encode(config.encoding)" instead
Posted by guest at 2007-07-10 11:56:20
Sure it will be much proper in global case.
In your case you have to specify cp1251 in pyicq-t.xml config file, and result
will be the same.
Offtopic: btw I didn't notice any difference when changing this value in config
in the original version of pyicqt.
Posted by maxbritov at 2007-07-10 14:33:47
i have <encoding>cp1251</encoding> in config.xml, not in pyicq.xml
Jan 19, 2008
Project Member
#1
d...@jabber.fsinf.de
Status:
Fixed
|