1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-14 18:36:40 +00:00

document another way to get UTF-8 encoding on stdin/stdout/stderr, fixes #2273

This commit is contained in:
Thomas Waldmann 2023-02-01 15:32:29 +01:00
parent 4515884af5
commit 856d98c72f
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -18,9 +18,6 @@ Important: JSON output is expected to be UTF-8, but currently borg depends on th
for that (must be a UTF-8 locale and *not* "C" or "ascii"), so that Python will choose to encode to UTF-8.
The same applies to any inputs read by borg, they are expected to be UTF-8 encoded also.
We consider this a bug (see :issue:`2273`) and might fix it later, so borg will use UTF-8 independent of
the locale.
On POSIX systems, you can usually set environment vars to choose a UTF-8 locale:
::
@ -29,6 +26,17 @@ On POSIX systems, you can usually set environment vars to choose a UTF-8 locale:
export LC_CTYPE=en_US.UTF-8
Another way to get Python's stdin/stdout/stderr streams to use UTF-8 encoding (without having
a UTF-8 locale / LANG / LC_CTYPE) is:
::
export PYTHONIOENCODING=utf-8
See :issue:`2273` for more details.
Dealing with non-unicode byte sequences and JSON limitations
------------------------------------------------------------