From: Dmitry Shachnev <mitya57@debian.org>
Date: Thu, 8 Oct 2015 11:57:13 -0700
Subject: make the help message not depend on runtime encoding

This message goes into manpage, and we do not want the manpage to misleadingly
mention build-time locale there.

Bug: https://bugs.debian.org/791587
Forwarded: no
Last-Update: 2023-05-20
---
 docutils/frontend.py         | 4 ++--
 test/data/help/docutils.txt  | 3 ++-
 test/data/help/rst2html.txt  | 3 ++-
 test/data/help/rst2latex.txt | 3 ++-
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/docutils/frontend.py b/docutils/frontend.py
index 2499c62..2e6e1a3 100644
--- a/docutils/frontend.py
+++ b/docutils/frontend.py
@@ -693,8 +693,8 @@ class OptionParser(optparse.OptionParser, docutils.SettingsSpec):
           ['--output-encoding-error-handler'],
           {'default': 'strict', 'validator': validate_encoding_error_handler}),
          ('Specify text encoding and optionally error handler '
-          'for error output.  Default: %s:%s.'
-          % (default_error_encoding, default_error_encoding_error_handler),
+          'for error output.  Default text encoding: system encoding. '
+          'Default error handler: %s.' % default_error_encoding_error_handler,
           ['--error-encoding', '-e'],
           {'metavar': '<name[:handler]>', 'default': default_error_encoding,
            'validator': validate_encoding_and_error_handler}),
diff --git a/test/data/help/docutils.txt b/test/data/help/docutils.txt
index 3cf41a5..ebebe89 100644
--- a/test/data/help/docutils.txt
+++ b/test/data/help/docutils.txt
@@ -72,7 +72,8 @@ General Docutils Options
                         "xmlcharrefreplace", "backslashreplace".
 --error-encoding=<name[:handler]>, -e <name[:handler]>
                         Specify text encoding and optionally error handler for
-                        error output.  Default: utf-8:backslashreplace.
+                        error output.  Default text encoding: system encoding.
+                        Default error handler: backslashreplace.
 --error-encoding-error-handler=ERROR_ENCODING_ERROR_HANDLER
                         Specify the error handler for unencodable characters
                         in error output.  Default: backslashreplace.
diff --git a/test/data/help/rst2html.txt b/test/data/help/rst2html.txt
index ea38342..5a84642 100644
--- a/test/data/help/rst2html.txt
+++ b/test/data/help/rst2html.txt
@@ -73,7 +73,8 @@ General Docutils Options
                         "xmlcharrefreplace", "backslashreplace".
 --error-encoding=<name[:handler]>, -e <name[:handler]>
                         Specify text encoding and optionally error handler for
-                        error output.  Default: utf-8:backslashreplace.
+                        error output.  Default text encoding: system encoding.
+                        Default error handler: backslashreplace.
 --error-encoding-error-handler=ERROR_ENCODING_ERROR_HANDLER
                         Specify the error handler for unencodable characters
                         in error output.  Default: backslashreplace.
diff --git a/test/data/help/rst2latex.txt b/test/data/help/rst2latex.txt
index adf8551..1e2dc01 100644
--- a/test/data/help/rst2latex.txt
+++ b/test/data/help/rst2latex.txt
@@ -73,7 +73,8 @@ General Docutils Options
                         "xmlcharrefreplace", "backslashreplace".
 --error-encoding=<name[:handler]>, -e <name[:handler]>
                         Specify text encoding and optionally error handler for
-                        error output.  Default: utf-8:backslashreplace.
+                        error output.  Default text encoding: system encoding.
+                        Default error handler: backslashreplace.
 --error-encoding-error-handler=ERROR_ENCODING_ERROR_HANDLER
                         Specify the error handler for unencodable characters
                         in error output.  Default: backslashreplace.
