Lines Matching defs:ENCODING
160 ENCODING = sys.getfilesystemencoding()
161 if ENCODING is None:
162 ENCODING = sys.getdefaultencoding()
206 # encoding, the following digits-1 bytes are a big-endian
226 def uts(s, encoding, errors):
234 return s.encode(encoding, "strict")
239 x.append(c.encode(encoding, "strict"))
244 return s.encode(encoding, errors)
960 def get_info(self, encoding, errors):
984 info[key] = info[key].encode(encoding, errors)
988 def tobuf(self, format=DEFAULT_FORMAT, encoding=ENCODING, errors="strict"):
991 info = self.get_info(encoding, errors)
998 return self.create_pax_header(info, encoding, errors)
1029 def create_pax_header(self, info, encoding, errors):
1038 # be represented in ASCII encoding.
1047 val = info[name].decode(encoding, errors)
1281 self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors)
1407 next._apply_pax_info(pax_headers, tarfile.encoding, tarfile.errors)
1421 def _apply_pax_info(self, pax_headers, encoding, errors):
1438 value = uts(value, encoding, errors)
1493 encoding = ENCODING # Encoding for 8-bit character strings.
1502 tarinfo=None, dereference=None, ignore_zeros=None, encoding=None,
1542 if encoding is not None:
1543 self.encoding = encoding
2014 buf = tarinfo.tobuf(self.format, self.encoding, self.errors)