U
    ;g                     @   sH   d dl mZmZmZmZ d dlZddlmZ e Z	ddgZ
dd ZdS )	    )unicode_literalsdivisionabsolute_importprint_functionN   )str_clszutf-8cp1252c                 C   sf   zt | tW S  tk
rX   tD ]2}zt | |ddW    Y S  tk
rP   Y q X q Y nX t | ddS )z
    Tries decoding a byte string from the OS into a unicode string

    :param byte_string:
        A byte string

    :return:
        A unicode string
    strict)errorsreplace)r   	_encodingUnicodeDecodeError_fallback_encodings)byte_stringencoding r   9/tmp/pip-unpacked-wheel-x1gypflw/oscrypto/_win/_decode.py_try_decode   s    r   )
__future__r   r   r   r   locale_typesr   getpreferredencodingr   r   r   r   r   r   r   <module>   s
   