?
Current File : //opt/alt/python313/lib64/python3.13/encodings/__pycache__/__init__.cpython-313.opt-1.pyc
�

L��i�����SrSSKrSSKrSSKJr 0rSrSrS/r\Rr	"SS	\
\5rS
r
Sr\R"\5 \R S:XaS
r\R"\5 gg)a1Standard "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�)�aliasesi�z--unknown--�*c��\rSrSrSrg)�CodecRegistryError�)�N)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r	��9/opt/alt/python313/lib64/python3.13/encodings/__init__.pyrr)s��rrc�L�[U[5(a[US5n/nSnUHinUR5(dUS:XaIU(aU(aUR	S5 UR5(aUR	U5 SnMgSnMk SR
U5$)a8Normalize 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�)�
isinstance�bytes�str�isalnum�append�isascii�join)�encoding�chars�punct�cs    r�normalize_encodingr!,s����(�E�"�"��x��)���E��E�
���9�9�;�;�!�s�(������S�!��y�y�{�{����Q���E��E���7�7�5�>�rc�<�[RU[5nU[LaU$[U5n[RU5=(d% [RURSS55nUbUU/nOU/nUH%nU(aSU;aM[
SU-[SS9n O SnURnUc5[[5[:�a[R5 S[U'gW"5n[U[R 5(GdmS[U5s=::aS::d*O [#SUR$<S	UR&<S
35e[)US5(a�[)US5(a�USb[)US5(aiUS
b[)US
5(aP[U5S:�aUSb[)US5(a([U5S:�aAUSb;[)US5(d([#SUR$<S	UR&<S35e[U5S:dUSc5USS[U5-
-UR$R+SS5S4--
n[R "U6n[[5[:�a[R5 U[U'UR-5nUHn	U	[;dMW[U	'M U$![a GMwf=f![a SnGNRf=f![a U$f=f)Nrrz
encodings.r)�fromlist�level��zmodule "z" (z) failed to registerr���zincompatible codecs in module "�)�)N)�_cache�get�_unknownr!�_aliases�replace�
__import__�_import_tail�ImportError�getregentry�AttributeError�len�	_MAXCACHE�clearr�codecs�	CodecInforr
�__file__�callable�split�
getaliases)
r�entry�
norm_encoding�aliased_encoding�modnames�modname�modr4�codecaliases�aliass
          r�search_functionrGHs���
�J�J�x��*�E��H����'�x�0�M��|�|�M�2�E��|�|�M�$9�$9�#�s�$C�D���#�$�!�#��"�?�����#��.��
	��\�G�3�l�#$�&�C�
������o�o��
�{��v�;�)�#��L�L�N���x���
�M�E��e�V�-�-�.�.��C��J�#�!�#�$�(+���c�l�l�&D�E�
E���a��!�!��%��(�);�);��!�H� ��%��(�);�);��!�H� ��%��(�);�);���J��N�u�Q�x�3�H�U�1�X�<N�<N���J��N�u�Q�x�3�H�U�1�X�<N�<N�$�(+���c�l�l�&D�E�
E��u�:�a�<�5��8�+��W�a��E�
�l�+�s�|�|�/A�/A�#�q�/I�!�/L�.N�N�N�E�� � �%�(���6�{�i�������F�8��*��~�~�'��"�E��H�$�")����"�
�L��q�	�
�	��������J�
���L�
�s6�K(�+K:�8L
�(
K7�6K7�:L
�	L
�
L�L�win32c��SSKnSUR5-nX:XaSSKnURR	5$g![
a gf=f)Nrzcp%s)�_winapi�GetACP�encodings.mbcs�mbcsr4r3)rrJ�ansi_code_page�	encodingss    r�_alias_mbcsrP�sP��	��#�g�n�n�&6�6�N��)�%� �~�~�1�1�3�3�*���	��	�s�9=�
A
�	A
)�__doc__r9�sysrrr,r7r.r2r/�LookupError�SystemErrorrr!rG�register�platformrPr	rr�<module>rWs����<�
��	���	����u���?�?��	��k�	��8V�r���� ��<�<�7��
	��O�O�K� �!r