%PDF- %PDF-
Direktori : /usr/lib/python3.12/encodings/__pycache__/ |
Current File : //usr/lib/python3.12/encodings/__pycache__/utf_8_sig.cpython-312.pyc |
� ���f% � �� � d Z ddlZdd�Zdd�Z G d� dej � Z G d� dej � Z G d � d ej � Z G d� dej � Zd � Z y)a Python 'utf-8-sig' Codec This work similar to UTF-8 with the following changes: * On encoding/writing a UTF-8 encoded BOM will be prepended/written as the first three bytes. * On decoding/reading if the first three bytes are a UTF-8 encoded BOM, these bytes will be skipped. � Nc �l � t j t j | |� d z t | � fS �Nr )�codecs�BOM_UTF8�utf_8_encode�len)�input�errorss �*/usr/lib/python3.12/encodings/utf_8_sig.py�encoder s1 � ��O�O�f�1�1�%��@��C�C���J�� � c � � d}| d d t j k( r| dd } d}t j | |d� \ }}|||z fS )Nr � T)r r �utf_8_decode)r r �prefix�output�consumeds r �decoder sQ � � �F��R�a�y�F�O�O�#��a�b� �����,�,�U�F�D�A��V�X��H�V�O�$�$r c �. � e Zd Zdd�Zdd�Zd� Zd� Zd� Zy) �IncrementalEncoderc �R � t j j | |� d| _ y �N� )r r �__init__�first��selfr s r r zIncrementalEncoder.__init__ s � ��!�!�*�*�4��8��� r c �� � | j r;d| _ t j t j || j � d z S t j || j � d S r )r r r r r )r r �finals r r zIncrementalEncoder.encode sX � ��:�:��D�J��?�?��&�&�u�d�k�k�:�1�=�>� >� �&�&�u�d�k�k�:�1�=�=r c �P � t j j | � d| _ y r )r r �resetr �r s r r! zIncrementalEncoder.reset'