o
    CZŽh>  ã                   @   s$   d Z ddlmZ dd„ Zdd„ ZdS )z9
Utility functions to help with Python 2/3 compatibility
é   )Úsixc                 C   s   t  | ¡ d¡S )a‘  
    Takes in a value and converts it to a text (unicode) type.  Then decodes that
    type to a byte array encoded in utf-8.  In 2.X the resulting object will be a
    str and in 3.X the resulting object will be bytes.  In both 2.X and 3.X any
    object can be passed in and the object's __str__ will be used (or __repr__ if
    __str__ is not defined) if the object is not already a text type.
    úutf-8)r   Ú	text_typeÚencode©Úvalue© r   úG/var/www/auris/lib/python3.10/site-packages/pyttsx3/drivers/__init__.pyÚtoUtf8   s   r
   c                 C   s
   |   d¡S )zÈ
    Takes in a byte array encoded as utf-8 and returns a text (unicode) type.  In
    2.X we expect a str type and return a unicde type.  In 3.X we expect a bytes
    type and return a str type.
    r   )Údecoder   r   r   r	   ÚfromUtf8   s   
r   N)Ú__doc__Ú r   r
   r   r   r   r   r	   Ú<module>   s   
