From: W. Trevor King Date: Fri, 14 Feb 2014 16:48:54 +0000 (-0800) Subject: nmbug-status: Encode output using the user's locale X-Git-Tag: 0.18_rc0~142 X-Git-Url: https://git.cworth.org/git?p=notmuch;a=commitdiff_plain;h=ffed8f2866a567d52eebeca02d3c362de07efc9d nmbug-status: Encode output using the user's locale Instead of always writing UTF-8, allow the user to configure the output encoding using their locale. This is useful for previewing output in the terminal, for poor souls that don't use UTF-8 locales ;). --- diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index 018f1911..c4532f18 100755 --- a/devel/nmbug/nmbug-status +++ b/devel/nmbug/nmbug-status @@ -90,7 +90,7 @@ class Page (object): byte_stream = sys.stdout.buffer except AttributeError: # Python 2 byte_stream = sys.stdout - stream = codecs.getwriter(encoding='UTF-8')(stream=byte_stream) + stream = codecs.getwriter(encoding=_ENCODING)(stream=byte_stream) self._write_header(views=views, stream=stream) for view in views: self._write_view(database=database, view=view, stream=stream) @@ -249,7 +249,7 @@ _PAGES['html'] = HtmlPage( header=''' - + Notmuch Patches