Show More
@@ -421,8 +421,8 b' class notifier(object):' | |||
|
421 | 421 | maxsubject = int(self.ui.config(b'notify', b'maxsubject')) |
|
422 | 422 | if maxsubject: |
|
423 | 423 | subject = stringutil.ellipsis(subject, maxsubject) |
|
424 |
msg['Subject'] = |
|
|
425 |
|
|
|
424 | msg['Subject'] = mail.headencode( | |
|
425 | self.ui, subject, self.charsets, self.test | |
|
426 | 426 | ) |
|
427 | 427 | |
|
428 | 428 | # try to make message have proper sender |
@@ -365,13 +365,13 b' def headencode(ui, s, charsets=None, dis' | |||
|
365 | 365 | if not display: |
|
366 | 366 | # split into words? |
|
367 | 367 | s, cs = _encode(ui, s, charsets) |
|
368 |
return |
|
|
369 | return s | |
|
368 | return email.header.Header(s, cs).encode() | |
|
369 | return encoding.strfromlocal(s) | |
|
370 | 370 | |
|
371 | 371 | |
|
372 | 372 | def _addressencode(ui, name, addr, charsets=None): |
|
373 | 373 | assert isinstance(addr, bytes) |
|
374 |
name = |
|
|
374 | name = headencode(ui, name, charsets) | |
|
375 | 375 | try: |
|
376 | 376 | acc, dom = addr.split(b'@') |
|
377 | 377 | acc.decode('ascii') |
General Comments 0
You need to be logged in to leave comments.
Login now