HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/charset_normalizer/__pycache__/legacy.cpython-311.pyc
�

�ct�	�n�ddlmZmZmZddlmZddlmZdedee	eee	e
fffd�ZdS)	�)�Dict�Optional�Union�)�
from_bytes)�CHARDET_CORRESPONDENCE�byte_str�returnc���t|ttf��s/td�t|�������t|t��rt|��}t
|�����}|�|jnd}|�|j	dkr|j	nd}|�
d|j
z
nd}|�|dkr|jr|dz
}|tvr|nt|||d�S)	a�
    chardet legacy method
    Detect the encoding of the given byte string. It should be mostly backward-compatible.
    Encoding name will match Chardet own writing whenever possible. (Not on encoding name unsupported by it)
    This function is deprecated and should be used to migrate your project easily, consult the documentation for
    further information. Not planned for removal.

    :param byte_str:     The byte sequence to examine.
    z4Expected object of type bytes or bytearray, got: {0}N�Unknown�g�?�utf_8�_sig)�encoding�language�
confidence)
�
isinstance�	bytearray�bytes�	TypeError�format�typer�bestrr�chaos�bomr)r	�rrrrs     �;/usr/lib/python3/dist-packages/charset_normalizer/legacy.py�detectrs���h��E� 2�3�3�
��
��&��h���(�(�
�
�	
�
�(�I�&�&�#���?�?���8���!�!�#�#�A��]�q�z�z��H��]�q�z�Y�/F�/F�q�z�z�B�H�"#�-��q�w���T�J�	�}��W�,�,���,��F����1�1�1��H�
#�H�
-�� ����N)�typingrrr�apir�constantrr�str�floatr�rr�<module>r&s���(�(�(�(�(�(�(�(�(�(�������,�,�,�,�,�,�$�U�$�t�C��%��U�
�2C�)D�$D�E�$�$�$�$�$�$r