code: def encode(cls, entry):
          
          (data, info) = entry
          if info['mime_type'] in cls.utf8_mime_types:
              return data.encode('utf-8')
          else:
              return data
docs: Classmethod that applies conditional encoding based on
          mime-type. Given an entry as returned by __call__ return the
          data in the appropriate encoding.