Takes a unicode string representing a munged header value and decodes it as a (possibly non-ASCII) readable value.
(header_str)
| 168 | |
| 169 | # Helper function(s) |
| 170 | def decode_header(header_str): |
| 171 | """Takes a unicode string representing a munged header value |
| 172 | and decodes it as a (possibly non-ASCII) readable value.""" |
| 173 | parts = [] |
| 174 | for v, enc in _email_decode_header(header_str): |
| 175 | if isinstance(v, bytes): |
| 176 | parts.append(v.decode(enc or 'ascii')) |
| 177 | else: |
| 178 | parts.append(v) |
| 179 | return ''.join(parts) |
| 180 | |
| 181 | def _parse_overview_fmt(lines): |
| 182 | """Parse a list of string representing the response to LIST OVERVIEW.FMT |
no test coverage detected