
    <h                     R    S r SSKrSSKrSSKrSS jr\" 5       r\4S jr\" 5       rg)z+
Utilities for dealing with text encodings
    Nc                 b    [        U S5      (       a  U R                  (       d  U$ U R                  $ )a  Return the given stream's encoding or a default.

There are cases where ``sys.std*`` might not actually be a stream, so
check for the encoding attribute prior to returning it, and return
a default if it doesn't exist or evaluates as False. ``default``
is None if not provided.
encoding)hasattrr   )streamdefaults     iC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\IPython/utils/encoding.pyget_stream_encr	      s&     6:&&foo    c                 z   U [         La  [        R                  " S[        SS9  Sn SnU (       a  [	        [
        R                  5      nU(       a  US:X  a   [        R                  " 5       nU=(       d    [
        R                  " 5       nUS:X  a  [        R                  " S[        5        g	U$ ! [         a     NNf = f)
a  Return IPython's guess for the default encoding for bytes as text.

If prefer_stream is True (default), asks for stdin.encoding first,
to match the calling Terminal, but that is often None for subprocesses.

Then fall back on locale.getpreferredencoding(),
which should be a sensible platform default (that respects LANG environment),
and finally to sys.getdefaultencoding() which is the most conservative option,
and usually UTF8 as of Python 3.
zgetpreferredencoding(prefer_stream=) argument is deprecated since IPython 9.0, getdefaultencoding() will take no argument in the future. If you rely on `prefer_stream`, please open an issue on the IPython repo.   )
stacklevelTNasciicp0zInvalid code page cp0 detected - using cp1252 instead.If cp1252 is incorrect please ensure a valid code page is defined for the process.cp1252)	_sentinelwarningswarnDeprecationWarningr	   sysstdinlocalegetpreferredencoding	ExceptiongetdefaultencodingRuntimeWarning)prefer_streamencs     r   r   r   +   s     I%  	
 
CSYY'#.	 --/C 
)'')C e|* 		
 J  		s   B- -
B:9B:)N)	__doc__r   r   r   r	   objectr   r   DEFAULT_ENCODING r
   r   <module>r"      s9       H	 &/ +\ &' r
   