From 3c32c36bf8028df1bb452f6881c76a036d037104 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 22 Mar 2013 08:38:05 +0530 Subject: [PATCH] Fix #1158499 (ebook-convert help displays escape characters) --- src/calibre/ebooks/conversion/cli.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calibre/ebooks/conversion/cli.py b/src/calibre/ebooks/conversion/cli.py index c1f4d46f79..f2e5f4e3c9 100644 --- a/src/calibre/ebooks/conversion/cli.py +++ b/src/calibre/ebooks/conversion/cli.py @@ -12,7 +12,6 @@ from optparse import OptionGroup, Option from calibre.utils.config import OptionParser from calibre.utils.logging import Log -from calibre.constants import preferred_encoding from calibre.customize.conversion import OptionRecommendation from calibre import patheq from calibre.ebooks.conversion import ConversionUserFeedBack @@ -53,8 +52,7 @@ HEURISTIC_OPTIONS = ['markup_chapter_headings', DEFAULT_TRUE_OPTIONS = HEURISTIC_OPTIONS + ['remove_fake_margins'] def print_help(parser, log): - help = parser.format_help().encode(preferred_encoding, 'replace') - log(help) + parser.print_help() def check_command_line_options(parser, args, log): if len(args) < 3 or args[1].startswith('-') or args[2].startswith('-'):