res.append(c)
Just remove chr()
c is single character of a string, but not an integer value of a character.
I could see via grep, decode(s) is used with folders in modules used for imap
for c in s:
See also https://git.kolab.org/diffusion/P/browse/pykolab-0.7/pykolab/imap_utf7.py line 52 , 74