PHP 8.2.30
Preview: __init__.py Size: 1.55 KB
/opt/hc_python/lib64/python3.12/site-packages/charset_normalizer/__init__.py

"""
Charset-Normalizer
~~~~~~~~~~~~~~
The Real First Universal Charset Detector.
A library that helps you read text from an unknown charset encoding.
Motivated by chardet, This package is trying to resolve the issue by taking a new approach.
All IANA character set names for which the Python core library provides codecs are supported.

Basic usage:
   >>> from charset_normalizer import from_bytes
   >>> results = from_bytes('Bсеки човек има право на образование. Oбразованието!'.encode('utf_8'))
   >>> best_guess = results.best()
   >>> str(best_guess)
   'Bсеки човек има право на образование. Oбразованието!'

Others methods and usages are available - see the full documentation
at <https://github.com/Ousret/charset_normalizer>.
:copyright: (c) 2021 by Ahmed TAHRI
:license: MIT, see LICENSE for more details.
"""

from __future__ import annotations

import logging

from .api import from_bytes, from_fp, from_path, is_binary
from .legacy import detect
from .models import CharsetMatch, CharsetMatches
from .utils import set_logging_handler
from .version import VERSION, __version__

__all__ = (
    "from_fp",
    "from_path",
    "from_bytes",
    "is_binary",
    "detect",
    "CharsetMatch",
    "CharsetMatches",
    "__version__",
    "VERSION",
    "set_logging_handler",
)

# Attach a NullHandler to the top level logger by default
# https://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library

logging.getLogger("charset_normalizer").addHandler(logging.NullHandler())

Directory Contents

Dirs: 2 × Files: 13

Name Size Perms Modified Actions
cli DIR
- drwxr-xr-x 2025-04-04 08:02:01
Edit Download
- drwxr-xr-x 2025-04-04 08:02:01
Edit Download
22.09 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
12.23 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
39.53 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
2.27 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
15.69 KB lrwxr-xr-x 2025-04-04 08:02:01
Edit Download
19.57 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
274.32 KB lrwxr-xr-x 2025-04-04 08:02:01
Edit Download
12.10 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
0 B lrw-r--r-- 2025-04-04 08:02:01
Edit Download
11.72 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
115 B lrw-r--r-- 2025-04-04 08:02:01
Edit Download
1.55 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
109 B lrw-r--r-- 2025-04-04 08:02:01
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).