ic d Z ddlZddZddZ G d dej Z G d d ej Z G d dej Z G d d ej Zd Z dS )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. Nstrictc p t j t j | | d z t | fS Nr )codecsBOM_UTF8utf_8_encodelen)inputerrorss @/opt/alt/python-internal/lib64/python3.11/encodings/utf_8_sig.pyencoder s1 Of1%@@CCJJ c d}| d d t j k r| dd } d}t j | |d \ }}|||z fS )Nr T)r r utf_8_decode)r r prefixoutputconsumeds r decoder sV FRaRyFO##abb ,UFDAAVXHVO$$r c 0 e Zd Zd dZd dZd Zd Zd ZdS )IncrementalEncoderr c T t j | | d| _ d S N )r r __init__firstselfr s r r zIncrementalEncoder.__init__ s&