Группа :: Система/Серверы
Пакет: pyicq-t
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: pyicq-t.charset.patch
diff -urN src.orig/legacy/glue.py src/legacy/glue.py
--- src.orig/legacy/glue.py 2006-03-07 04:23:53 +0300
+++ src/legacy/glue.py 2006-03-15 15:28:59 +0300
@@ -180,7 +180,7 @@
LogEvent(INFO, self.session.jabberID)
if uin[0].isdigit():
encoding = config.encoding
- charset = "iso-8859-1"
+ charset = "windows-1251"
if self.legacyList.hasCapability(uin, "unicode"):
encoding = "utf-16be"
charset = "unicode"
diff -urN src.orig/legacy/icqt.py src/legacy/icqt.py
--- src.orig/legacy/icqt.py 2006-03-07 04:19:25 +0300
+++ src/legacy/icqt.py 2006-03-15 15:31:09 +0300
@@ -286,7 +286,7 @@
url = user.url
if status != None:
- charset = "iso-8859-1"
+ charset = "windows-1251"
m = None
if msg[0]:
m = re.search('charset="(.+)"', msg[0])
@@ -296,7 +296,7 @@
charset = 'utf-16be'
elif charset == 'utf-8': pass
elif charset == "us-ascii":
- charset = "iso-8859-1"
+ charset = "windows-1251"
else:
LogEvent(INFO, self.session.jabberID, "Unknown charset (%s) of buddy's away message" % msg[0]);
charset = config.encoding
diff -urN src.orig/tlib/oscar.py src/tlib/oscar.py
--- src.orig/tlib/oscar.py 2006-03-06 04:30:30 +0300
+++ src/tlib/oscar.py 2006-03-15 15:32:29 +0300
@@ -1862,7 +1862,7 @@
charSet = 0xffff
else:
try:
- part[0] = part[0].encode('iso-8859-1')
+ part[0] = part[0].encode('windows-1251')
charSet = 3
except:
try:
@@ -1870,7 +1870,7 @@
charSet = 2
except:
#part[0] = repl(part[0]).encode('i18-8859-1', 'replace')
- part[0] = part[0].encode('iso-8859-1', 'replace')
+ part[0] = part[0].encode('windows-1251', 'replace')
charSet = 3
#if 'unicode' in part[1:]:
# charSet = 2