HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/osm/venv/lib64/python3.10/site-packages/charset_normalizer/__pycache__/legacy.cpython-310.pyc
o

=i�
�@svddlmZddlmZmZddlmZddlmZddl	m
Z
mZer2ddlm
Z
Gdd	�d	e
�Z	
dddd�ZdS)�)�annotations)�
TYPE_CHECKING�Any)�warn�)�
from_bytes)�CHARDET_CORRESPONDENCE�TOO_SMALL_SEQUENCE)�	TypedDictc@s&eZdZUded<ded<ded<dS)�
ResultDictz
str | None�encoding�str�languagezfloat | None�
confidenceN)�__name__�
__module__�__qualname__�__annotations__�rr�G/opt/osm/venv/lib/python3.10/site-packages/charset_normalizer/legacy.pyr
s
rF�byte_str�bytes�should_rename_legacy�bool�kwargsr�returncKs t|�rtdd�t|�����d��t|ttf�s#tdt	|�����t|t�r,t|�}t
|���}|dur9|jnd}|durG|j
dkrG|j
nd}|durRd|jnd}|duro|d	kro|d
vro|jdurot|�tkro|d8}|dur~|d
kr~|jr~|d7}|dur�|tvr�t|}|||d�S)aJ
    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.
    :param should_rename_legacy:  Should we rename legacy encodings
                                  to their more modern equivalents?
    z(charset-normalizer disregard arguments '�,z' in legacy function detect()z1Expected object of type bytes or bytearray, got: N�Unknown�g�?g�������?>�ascii�utf_8Fg�������?r �_sig)rrr)�lenr�join�list�keys�
isinstance�	bytearrayr�	TypeError�typer�bestrrZchaos�bomr	r)rrr�rrrrrrr�detects<��
�
�r-N)F)rrrrrrrr)�
__future__r�typingrr�warningsr�apirZconstantrr	Ztyping_extensionsr
rr-rrrr�<module>s�