My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 130 attachment: pyicq08b-senducs2.patch (1.0 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff -Naur src/tlib/oscar.py src-back/tlib/oscar.py
--- src/tlib/oscar.py 2008-06-28 17:41:40.000000000 +0300
+++ src-back/tlib/oscar.py 2008-06-02 14:31:13.000000000 +0300
@@ -2026,11 +2026,15 @@
charSet = 0x0000
except:
try:
- part[0] = part[0].encode('utf-16be', 'replace')
- charSet = 0x0002
- except:
- part[0] = part[0].encode(config.encoding, 'replace')
+ part[0] = part[0].encode(config.encoding)
charSet = 0x0003
+ except:
+ try:
+ part[0] = part[0].encode('utf-16be', 'replace')
+ charSet = 0x0002
+ except:
+ part[0] = part[0].encode('iso-8859-1', 'replace')
+ charSet = 0x0003
if 'macintosh' in part[1:]:
charSubSet = 0x000b
elif 'none' in part[1:]:
Powered by Google Project Hosting