def _decode_and_join_header(header, separator=u' '):
 if (not header):
  return header
 return separator.join((unicode(s, (c or 'us-ascii')) for (s, c) in email.header.decode_header(header)))

def _decode_and_join_header ( header , separator = u' ' ) : if ( not header ) : return header return separator . join ( ( unicode ( s , ( c or 'us-ascii' ) ) for ( s , c ) in email . header . decode_header ( header ) ) )
helper function to decode rfc2047 encoded headers .