Hi all! We got often problems with spammails, which have special characters in the header. The tmda-cgi is still unaseable, till I delete the pending file or remove the specials chars in it.
What we have to change to bypass this unicode error?
In this expamle the "From"-field looks like this: "From: Viagra.com Inc
® <[EMAIL PROTECTED]>"
Hope someone needs an answer...
so long,
Andreas
UnicodeDecodeError Python 2.3.4: /usr/bin/python
Wed Sep 5 07:17:50 2007
A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.
/usr/src/tmda-cgi-0.13/tmda-cgi.py
188 elif Cmd == "pending":
189 import PendList
190 Call(PendList)
191 elif Cmd == "restore":
192 pass
Call = <function Call>, PendList = <module 'PendList' from
'/usr/src/tmda-cgi-0.13/PendList.pyc'>
/usr/src/tmda-cgi-0.13/tmda-cgi.py in Call(Library=<module 'PendList'
from '/usr/src/tmda-cgi-0.13/PendList.pyc'>, Str=None)
86 Library.Show(Str)
87 else:
88 Library.Show()
89
90 # Capture WebUID
Library = <module 'PendList' from
'/usr/src/tmda-cgi-0.13/PendList.pyc'>, Library.Show = <function Show>
/usr/src/tmda-cgi-0.13/PendList.py in Show()
498 value += Unicode.TranslateToUTF8(CharSet,
decoded[0], "ignore")
499 else:
500 value += Unicode.TranslateToUTF8(CharSet, decoded[0],
"ignore")
501 From = value
502 Temp = Address.search(From)
value = '', global Unicode = <module 'Unicode' from
'/usr/src/tmda-cgi-0.13/Unicode.pyc'>, Unicode.TranslateToUTF8 =
<function TranslateToUTF8>, CharSet = 'us-ascii"', decoded =
('Viagra.com Inc \xae <[EMAIL PROTECTED]>', None)
/usr/src/tmda-cgi-0.13/Unicode.py in
TranslateToUTF8(CharSet='us-ascii"', Str='Viagra.com Inc \xae
<[EMAIL PROTECTED]>', Errors='ignore')
113 Uni = Decoder(Str, errors = Errors)[0]
114 except:
115 Uni = Decoder(Str)[0]
116
117 # Encode for UTF-8
Uni undefined, Decoder = <built-in function ascii_decode>, Str =
'Viagra.com Inc \xae <[EMAIL PROTECTED]>'
UnicodeDecodeError: 'ascii' codec can't decode byte 0xae in position 15:
ordinal not in range(128)
args = ('ascii', 'Viagra.com Inc \xae <[EMAIL PROTECTED]>', 15, 16,
'ordinal not in range(128)')
encoding = 'ascii'
end = 16
object = 'Viagra.com Inc \xae <[EMAIL PROTECTED]>'
reason = 'ordinal not in range(128)'
start = 15
smime.p7s
Description: S/MIME cryptographic signature
_____________________________________________ tmda-users mailing list ([email protected]) http://tmda.net/lists/listinfo/tmda-users
