관리-도구
편집 파일: unicode_utils.cpython-311.pyc
� �܋fm � � � d dl Z d dlZd dlmZ ddlmZ ddlmZ d� Zd� Z d� Z ej fd ed efd�Z ej fded ed dfd �Z G d� de� � ZdS )� N)�ConfigParser� )�py39)�SetuptoolsDeprecationWarningc � � t | t � � rt j d| � � S | � d� � } t j d| � � } | � d� � } n# t $ r Y nw xY w| S )N�NFD�utf-8)� isinstance�str�unicodedata� normalize�decode�encode�UnicodeError)�paths �i/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/setuptools/unicode_utils.py� decomposer s� � ��$���� 2��$�U�D�1�1�1� ��{�{�7�#�#���$�U�D�1�1���{�{�7�#�#����� � � ��� �����Ks �?A, �, A9�8A9c � � t | t � � r| S t j � � pd}|df}|D ])} | � |� � c S # t $ r Y �&w xY wdS )z] Ensure that the given path is decoded, ``None`` when no expected encoding works r N)r r �sys�getfilesystemencodingr �UnicodeDecodeError)r �fs_enc� candidates�encs r �filesys_decoder s� � � �$���� ��� � &� (� (� 3�G�F����J�� � �� ��;�;�s�#�#�#�#�#��!� � � ��H� ���� �4s �A � A�Ac �P � | � |� � S # t $ r Y dS w xY w)z/turn unicode encoding into a functional routineN)r �UnicodeEncodeError)�stringr s r � try_encoder + s; � ���}�}�S�!�!�!��� � � ��t�t����s � � %�%�file�returnc �^ � t | dd�� � 5 }|� � � cddd� � S # 1 swxY w Y dS # t $ r` t � | |�� � t | d|�� � 5 }|� � � cddd� � cY S # 1 swxY w Y Y dS w xY w)a First try to read the file with UTF-8, if there is an error fallback to a different encoding ("locale" by default). Returns the content of the file. Also useful when reading files that might have been produced by an older version of setuptools. �rr ��encodingN�r �fallback_encoding)�open�readr �_Utf8EncodingNeeded�emit)r r'