- encto = emailstring.encode('us-ascii')
-except UnicodeDecodeError:
- if email.base64mime.base64_len(emailstring) < email.quoprimime.header_quopri_len(emailstring):
- encto = email.base64mime.header_encode(emailstring, 'us-ascii')
- else:
- encto = email.quoprimime.header_encode(emailstring, 'us-ascii')
-
-subjstring = "New Debian Maintainer " + FullName
-encsubj = ''
-try:
- encsubj = subjstring.encode('us-ascii')
-except UnicodeDecodeError:
- if email.base64mime.base64_len(subjstring) < email.quoprimime.header_quopri_len(subjstring):
- encsubj = email.base64mime.header_encode(subjstring, 'us-ascii')
- else:
- encsubj = email.quoprimime.header_encode(subjstring, 'us-ascii')
-
-Subst["__HEADER_SUBJ__"] = encsubj
-Subst["__HEADER_EMAIL"] = encto
+ encrealname = FullName.decode('us-ascii')
+except UnicodeError:
+ encrealname = str(email.Header.Header(FullName, 'utf-8', 200))
+
+Subst["__ENCODED_REALNAME__"] = encrealname