
    i                         S r SSKrSSKrSSKJr  0 rSrSrS/r\R                  r	 " S S	\
\5      rS
 rS r\R                  " \5        \R                   S:X  a  S r\R                  " \5        gg)a1  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   )aliasesi  z--unknown--*c                       \ rS rSrSrg)CodecRegistryError)    N)__name__
__module____qualname____firstlineno____static_attributes__r	       //usr/local/lib/python3.13/encodings/__init__.pyr   r   )   s    r   r   c                 L   [        U [        5      (       a  [        U S5      n / nSnU  Hi  nUR                  5       (       d  US:X  aI  U(       a  U(       a  UR	                  S5        UR                  5       (       a  UR	                  U5        SnMg  SnMk     SR                  U5      $ )a8  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 )
isinstancebytesstrisalnumappendisasciijoin)encodingcharspunctcs       r   normalize_encodingr!   ,   s     (E""x)EE99;;!s(S!yy{{QEE  775>r   c                 <   [         R                  U [        5      nU[        La  U$ [        U 5      n[        R                  U5      =(       d%    [        R                  UR                  SS5      5      nUb  UU/nOU/nU H%  nU(       a  SU;   a  M   [        SU-   [        SS9n  O   S n UR                  nUc5  [        [         5      [        :  a  [         R                  5         S [         U '   g W" 5       n[        U[        R                   5      (       Gdm  S[        U5      s=::  a  S::  d*  O  [#        SUR$                  < S	UR&                  < S
35      e[)        US   5      (       a  [)        US   5      (       a  US   b  [)        US   5      (       ai  US   b  [)        US   5      (       aP  [        U5      S:  a  US   b  [)        US   5      (       a(  [        U5      S:  aA  US   b;  [)        US   5      (       d(  [#        SUR$                  < S	UR&                  < S35      e[        U5      S:  d  US   c5  USS[        U5      -
  -  UR$                  R+                  SS5      S   4-   -  n[        R                   " U6 n[        [         5      [        :  a  [         R                  5         U[         U '    UR-                  5       nU H  n	U	[        ;  d  M  W[        U	'   M     U$ ! [         a     GMw  f = f! [         a    S n GNRf = f! [         a     U$ f = f)Nr   r   z
encodings.r   )fromlistlevel      zmodule "z" (z) failed to registerr            zincompatible codecs in module ")   )N)_cacheget_unknownr!   _aliasesreplace
__import___import_tailImportErrorgetregentryAttributeErrorlen	_MAXCACHEclearr   codecs	CodecInfor   r
   __file__callablesplit
getaliases)
r   entrynorm_encodingaliased_encodingmodnamesmodnamemodr4   codecaliasesaliass
             r   search_functionrG   H   s    JJx*EH 'x0M||M2 E||M$9$9#s$CD #$!# "?#.
	 \G3l#$&C   oo
 {v;)#LLNx MEeV--..CJ#!#$(+cll&D E Ea!!%(););!H %(););!H %(););JNuQx3HU1X<N<NJNuQx3HU1X<N<N$(+cll&D E Eu:a<58+WaE
l+s||/A/A#q/I!/L.NNNE  %( 6{iF8*~~' "EH$") "
 Lq  	 	  J   Ls6   K(+K: 8L (
K76K7:L
	L

LLwin32c                      SS K nSUR                  5       -  nX:X  a  SS KnUR                  R	                  5       $ g ! [
         a     g f = f)Nr   zcp%s)_winapiGetACPencodings.mbcsmbcsr4   r3   )r   rJ   ansi_code_page	encodingss       r   _alias_mbcsrP      sP    	#gnn&66N)% ~~1133 *  		s   9= 
A
	A
)__doc__r9   sysr   r   r,   r7   r.   r2   r/   LookupErrorSystemErrorr   r!   rG   registerplatformrP   r	   r   r   <module>rW      s   <  
 		u??	k 	8Vr   <<7
	 OOK ! r   