$10 GRAYBYTE WORDPRESS FILE MANAGER $59

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/python3.6/site-packages/pip/utils/

HOME
Current File : /lib/python3.6/site-packages/pip/utils//encoding.py
import codecs
import locale
import re


BOMS = [
    (codecs.BOM_UTF8, 'utf8'),
    (codecs.BOM_UTF16, 'utf16'),
    (codecs.BOM_UTF16_BE, 'utf16-be'),
    (codecs.BOM_UTF16_LE, 'utf16-le'),
    (codecs.BOM_UTF32, 'utf32'),
    (codecs.BOM_UTF32_BE, 'utf32-be'),
    (codecs.BOM_UTF32_LE, 'utf32-le'),
]

ENCODING_RE = re.compile(b'coding[:=]\s*([-\w.]+)')


def auto_decode(data):
    """Check a bytes string for a BOM to correctly detect the encoding

    Fallback to locale.getpreferredencoding(False) like open() on Python3"""
    for bom, encoding in BOMS:
        if data.startswith(bom):
            return data[len(bom):].decode(encoding)
    # Lets check the first two lines as in PEP263
    for line in data.split(b'\n')[:2]:
        if line[0:1] == b'#' and ENCODING_RE.search(line):
            encoding = ENCODING_RE.search(line).groups()[0].decode('ascii')
            return data.decode(encoding)
    return data.decode(locale.getpreferredencoding(False))

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
14 Aug 2025 9.24 PM
root / root
0755
__pycache__
--
14 Aug 2025 9.24 PM
root / root
0755
__init__.py
27.106 KB
6 Apr 2024 8.40 PM
root / root
0644
appdirs.py
8.604 KB
6 Apr 2024 8.40 PM
root / root
0644
build.py
1.281 KB
6 Apr 2024 8.40 PM
root / root
0644
deprecation.py
2.18 KB
6 Apr 2024 8.40 PM
root / root
0644
encoding.py
0.948 KB
6 Apr 2024 8.40 PM
root / root
0644
filesystem.py
0.878 KB
6 Apr 2024 8.40 PM
root / root
0644
glibc.py
2.87 KB
6 Apr 2024 8.40 PM
root / root
0644
hashes.py
2.799 KB
6 Apr 2024 8.40 PM
root / root
0644
logging.py
3.249 KB
6 Apr 2024 8.40 PM
root / root
0644
outdated.py
5.849 KB
6 Apr 2024 8.40 PM
root / root
0644
packaging.py
2.031 KB
6 Apr 2024 8.40 PM
root / root
0644
setuptools_build.py
0.271 KB
6 Apr 2024 8.40 PM
root / root
0644
ui.py
11.325 KB
6 Apr 2024 8.40 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF