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/alt/python37/lib/python3.7/site-packages/charset_normalizer/__pycache__/legacy.cpython-37.pyc
B

�b8
�@s�ddlZddlmZmZmZddlmZmZmZm	Z	ddl
mZddlm
Z
mZeeeeeeeffd�dd	�ZGd
d�de
�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZdS)�N)�Dict�Optional�Union�)�
from_bytes�from_fp�	from_path�	normalize)�CHARDET_CORRESPONDENCE)�CharsetMatch�CharsetMatches)�byte_str�returncCs�t|ttf�s td�t|����t|t�r2t|�}t|���}|dk	rL|jnd}|dk	rh|j	dkrh|j	nd}|dk	r~d|j
nd}|dk	r�|dkr�|jr�|d7}|tkr�|nt|||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_8Z_sig)�encoding�language�
confidence)
�
isinstance�	bytearray�bytes�	TypeError�format�typer�bestrrZchaos�bomr
)r
�rrrr�r�J/opt/alt/python37/lib/python3.7/site-packages/charset_normalizer/legacy.py�detect	s 

r c@seZdZdS)�CharsetNormalizerMatchN)�__name__�
__module__�__qualname__rrrrr!0sr!c@s<eZdZedd��Zedd��Zedd��Zedd��Zd	S)
�CharsetNormalizerMatchescOst�dt�t||�S)Nzkstaticmethod from_fp, from_bytes, from_path and normalize are deprecated and scheduled to be removed in 3.0)�warnings�warn�DeprecationWarningr)�args�kwargsrrrr5sz CharsetNormalizerMatches.from_fpcOst�dt�t||�S)Nzkstaticmethod from_fp, from_bytes, from_path and normalize are deprecated and scheduled to be removed in 3.0)r&r'r(r)r)r*rrrr>sz#CharsetNormalizerMatches.from_bytescOst�dt�t||�S)Nzkstaticmethod from_fp, from_bytes, from_path and normalize are deprecated and scheduled to be removed in 3.0)r&r'r(r)r)r*rrrrGsz"CharsetNormalizerMatches.from_pathcOst�dt�t||�S)Nzkstaticmethod from_fp, from_bytes, from_path and normalize are deprecated and scheduled to be removed in 3.0)r&r'r(r	)r)r*rrrr	Psz"CharsetNormalizerMatches.normalizeN)r"r#r$�staticmethodrrrr	rrrrr%4s			r%c@seZdZdS)�CharsetDetectorN)r"r#r$rrrrr,Zsr,c@seZdZdS)�
CharsetDoctorN)r"r#r$rrrrr-^sr-)r&�typingrrrZapirrrr	Zconstantr
Zmodelsrrr�str�floatr r!r%r,r-rrrr�<module>s$'&