Claudiu.Popa added the comment: Using \xff\xd8 sounds good to me. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16512> _______________________________________