Sfoglia il codice sorgente

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

Thomas Waldmann 2 anni fa
parent
commit
856d98c72f
1 ha cambiato i file con 11 aggiunte e 3 eliminazioni
  1. 11 3
      docs/internals/frontends.rst

+ 11 - 3
docs/internals/frontends.rst

@@ -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
 ------------------------------------------------------------