Ejemplo n.º 1
0
 def __call__(self, container):
     raw = container.raw_data(self.name)
     if isinstance(raw, type('')):
         raw, changed = replace_encoding_declarations(raw)
         if changed:
             container.open(self.name, 'wb').write(raw.encode('utf-8'))
             return True
Ejemplo n.º 2
0
 def __call__(self, container):
     raw = container.raw_data(self.name)
     if isinstance(raw, type('')):
         raw, changed = replace_encoding_declarations(raw)
         if changed:
             container.open(self.name, 'wb').write(raw.encode('utf-8'))
             return True
Ejemplo n.º 3
0
 def data(self):
     ans = self.get_raw_data()
     ans, changed = replace_encoding_declarations(ans,
                                                  enc='utf-8',
                                                  limit=4 * 1024)
     if changed:
         self.data = ans
     return ans.encode('utf-8')
Ejemplo n.º 4
0
 def fget(self):
     ans = self.get_raw_data()
     ans, changed = replace_encoding_declarations(ans, enc='utf-8', limit=4*1024)
     if changed:
         self.data = ans
     return ans.encode('utf-8')