| Server IP : 93.115.150.27 / Your IP : 216.73.216.221 Web Server : LiteSpeed System : Linux host2.azar.host 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 User : dorfakkh ( 1797) PHP Version : 8.1.34 Disable Function : show_source, system, passthru, exec, popen, proc_open, mail MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python37/lib/python3.7/site-packages/charset_normalizer/__pycache__/ |
Upload File : |
B
�b8
� @ s� d dl Z d dlmZmZmZ ddlmZmZmZm Z ddl
mZ ddlm
Z
mZ eeeeeeef f d�dd �ZG d
d� de
�ZG dd
� d
e�ZG dd� de�ZG dd� de�ZdS )� N)�Dict�Optional�Union� )�
from_bytes�from_fp� from_path� normalize)�CHARDET_CORRESPONDENCE)�CharsetMatch�CharsetMatches)�byte_str�returnc C s� 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 }|tkr�|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 �bestr r Zchaos�bomr
)r
�rr r r � r �J/opt/alt/python37/lib/python3.7/site-packages/charset_normalizer/legacy.py�detect s
r c @ s e Zd ZdS )�CharsetNormalizerMatchN)�__name__�
__module__�__qualname__r r r r r! 0 s r! c @ s<