gdZddlZddlZddlmZiZdZdgZejZGdde e Z d Z d Z eje ejd k(rd Zejeyy) a2 Standard "encodings" Package Standard Python encoding modules are stored in this package directory. Codec modules must have names corresponding to normalized encoding names as defined in the normalize_encoding() function below, e.g. 'utf-8' must be implemented by the module 'utf_8.py'. Each codec module must export the following interface: * getregentry() -> codecs.CodecInfo object The getregentry() API must return a CodecInfo object with encoder, decoder, incrementalencoder, incrementaldecoder, streamwriter and streamreader attributes which adhere to the Python Codec Interface Standard. In addition, a module may optionally also define the following APIs which are then used by the package's codec search function: * getaliases() -> sequence of encoding name strings to use as aliases Alias names returned by getaliases() must be normalized encoding names as defined by normalize_encoding(). Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. N)aliasesz --unknown--*c eZdZy)CodecRegistryErrorN)__name__ __module__ __qualname__9/opt/alt/python312/lib64/python3.12/encodings/__init__.pyrr(sr rct|tr t|d}g}d}|D]R}|js|dk(r9|r|r|j d|j r|j |d}Qd}Tdj |S)ae Normalize an encoding name. Normalization works as follows: all non-alphanumeric characters except the dot used for Python package names are collapsed and replaced with a single underscore, e.g. ' -;#' becomes '_'. Leading and trailing underscores are removed. Note that encoding names should be ASCII only. asciiF._T) isinstancebytesstrisalnumappendisasciijoin)encodingcharspunctcs r normalize_encodingr+s|(E"x) E E  99;!s( S!yy{ QEE 775>r ctj|t}|tur|St|}tj|xs%tj|j dd}|||g}n|g}|D] }|rd|vr t d|ztd}nd} |j}| dt|<y}t|tjs@dt|cxkrdks(ntd|j d |j"d t%|drvt%|d rh|d t%|d rU|d t%|d rBt|dkDr|dt%|dr!t|dkDr9|d4t%|ds&td|j d |j"dt|dks|d5|ddt|z z|j j'dd d fzz }tj|}|t|< |j)}|D]} | tvs t| <|S#t$rYwxYw#t$rd}YwxYw#t$rY|SwxYw)Nrrz encodings.r)fromlistlevelzmodule "z" (z) failed to registerrzincompatible codecs in module "))N)_cacheget_unknownr_aliasesreplace __import__ _import_tail ImportError getregentryAttributeErrorrcodecs CodecInfolenrr__file__callablesplit getaliases) rentry norm_encodingaliased_encodingmodnamesmodnamemodr1 codecaliasesaliass r search_functionrBGs JJx *E H 'x0M||M2E||M$9$9#s$CD#$!#"?#.  \G3l#$&C oo  {x ME eV-- .CJ#!#$(+ cll&DE Ea!%(); !H %(); !H %(); JNuQx3HU1X)% ~~1133*   s9= A A )__doc__r3sysrrr)r+r/r, LookupError SystemErrorrrrBregisterplatformrKr r r rRs<   u ?? k 8Rj <<7 FOOK !r