+
    Si                     n    R t ^ RIHt ^ RIHt ^ RIHt ^ RItRR ltRR ltRR ltRR lt	RR	 lt
R
 tR# )zCA module for dealing with unknown string and environment encodings.)absolute_import)division)unicode_literalsNc                    ?V # )zEncode the text string to a byte string.

Args:
  string: str, The text string to encode.
  encoding: The suggested encoding if known.

Returns:
  str, The binary string.
 )stringencodings   &&T/home/ubuntu/hermes-agent/venv/lib/python3.14/site-packages/fire/console/encoding.pyEncoder
      s     	-    c                   V f   R# \        V \        4      '       g   \        V \        4      '       d   T pM\        V 4      p\        V\        4      '       d   V#  VP                  R4      #   \         d     Mi ; iT'       d$    TP                  T4      #   \         d     Mi ; i TP                  R4      #   \         d     Mi ; i TP                  \
        P                  ! 4       4      #   \         d     Mi ; i TP                  \
        P                  ! 4       4      #   \         d     Mi ; iTP                  R4      # )a  Returns string with non-ascii characters decoded to UNICODE.

UTF-8, the suggested encoding, and the usual suspects will be attempted in
order.

Args:
  data: A string or object that has str() and unicode() methods that may
    contain an encoding incompatible with the standard output encoding.
  encoding: The suggested encoding if known.

Returns:
  A text string representing the decoded byte string.
Nasciiutf8z
iso-8859-1)
isinstancestrbytesdecodeUnicodeErrorsysgetfilesystemencodinggetdefaultencoding)datar   r   s   && r	   Decoder   (   s/    
\ cju55F YFM	==!!	 		
 ]]8$$ 
	==  	 		
	==22455	 		
	==//122	 		& 
|	$$sZ   A+ +A98A9B B$#B$(B9 9CC#C/ /C=<C=#D% %D32D3c                \    \        V4      pV P                  V4      pVf   V# \        V4      # )zReturns the decoded value of the env var name.

Args:
  env: {str: str}, The env dict.
  name: str, The env var name.
  default: The value to return if name is not in env.

Returns:
  The decoded value of the env var name.
)r
   getr   )envnamedefaultvalues   &&& r	   GetEncodedValuer   |   s0     
$
''$-%
]N 
r   c                j    \        WR7      pVf   V P                  VR4       R# \        W#R7      W&   R# )a  Sets the value of name in env to an encoded value.

Args:
  env: {str: str}, The env dict.
  name: str, The env var name.
  value: str or unicode, The value for name. If None then name is removed from
    env.
  encoding: str, The encoding to use or None to try to infer it.
r   N)r
   pop)r   r   r   r   s   &&&&r	   SetEncodedValuer#      s0    & 
	($
]GGD$
U.#)r   c           
         T;'       g    \        4       pV P                  4        UUu/ uF  w  r#\        W!R7      \        W1R7      bK  	  upp# u uppi )a  Encodes all the key value pairs in env in preparation for subprocess.

Args:
  env: {str: str}, The environment you are going to pass to subprocess.
  encoding: str, The encoding to use or None to use the default.

Returns:
  {bytes: bytes}, The environment to pass to subprocess.
r!   )_GetEncodingitemsr
   )r   r   kvs   &&  r	   	EncodeEnvr)      sQ     ''( ))+
$! Q"F1$@@
  
s   "Ac                 f    \         P                  ! 4       ;'       g    \         P                  ! 4       # )z!Gets the default encoding to use.)r   r   r   r   r   r	   r%   r%      s"    		"	"	$	@	@(>(>(@@r   )N)__doc__
__future__r   r   r   r   r
   r   r   r#   r)   r%   r   r   r	   <module>r-      s8   " J &  ' 
Q%h(/4"Ar   