HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/ocrmypdf/__pycache__/_unicodefun.cpython-38.pyc
U

��Z^h�@s$ddlZddlZddlZdd�ZdS)�Nc	Cs�tjdd�dkrdSzddl}t�|���j}Wntk
rJd}YnX|dkrXdSd}tjdk�r�ddl	}|j
dd	g|j|jd
�j}t
�}d}t|t�r�|�dd�}|��D]4}|��}|���d
�r�|�|�|��dkr�d}q�|d7}|s�|d7}n&|�r|d7}n|dd�t|��7}d}tj�d�tj�d�fD]0}|�r^|���d
��r^|}|dk	�r@�qr�q@|dk	�r�|d|7}td|��dS)z=Ensures that the environment is good for unicode on Python 3.r�)r�rN�ascii��posix�localez-a)�stdout�stderrF�replace)z.utf-8z.utf8)zc.utf8zc.utf-8Tz

z�Additional information: on this system no suitable UTF-8
locales were discovered.  This most likely requires resolving
by reconfiguring the locale system.z�This system supports the C.UTF-8 locale which is recommended.
You might be able to resolve your issue by exporting the
following environment variables:

    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8z�This system lists a couple of UTF-8 supporting locales that
you can pick from.  The following suitable locales were
discovered: %sz, �LC_ALLZLANGz�
ocrmypdf discovered that you exported a UTF-8 locale
but the locale system could not pick up from it because
it does not exist.  The exported locale is "%s" but it
is not supportedzsocrmypdf will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.)�sys�version_infor�codecs�lookup�getpreferredencoding�name�	Exception�os�
subprocess�run�PIPEr�set�
isinstance�bytes�decode�
splitlines�strip�lower�endswith�add�join�sorted�environ�get�RuntimeError)	rZfs_encZextrar�rvZgood_localesZ
has_c_utf8�lineZ
bad_locale�r'�6/usr/lib/python3/dist-packages/ocrmypdf/_unicodefun.py�verify_python3_env)sp
�

���


���r))rrrr)r'r'r'r(�<module>$s