[Bug 590156] error whilst pushing tree

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:

  sysadmin | Other | Ver: unspecified

------- Comment #3 from Todd Zullinger  2009-07-29 23:13 UTC -------
The try/except block _should_ have tested for non-ascii and only if encoding
the string as ascii encoded the header using python's email.Header.Header() (to
render it something like '=?utf-8?b?VMO2ZGQ=?=').

But somehow the data passed either the unicode(fullname, 'ascii') call or was
successfully encoded by email.Header and still had the non-ascii '0xe2' in it. 
I expected that would not be possible (and obviously I was wrong).

(The code in question, so no one reading has to dig it out of git, goes like

    if fullname != "":
            user_fullname = unicode(fullname, 'ascii')
        except UnicodeDecodeError:
            user_fullname = Header.Header(fullname, 'utf-8').encode()

Later, user_fullname is used to build from_address, which is what was being
parsed on line 124 where the traceback occurred.)

Do you know if your gecos entry on gnome.org has any non-ascii characters in
it?  And if so, what encoding is used for the data?

See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=590156.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]