Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1836C431FB6 for ; Fri, 14 Feb 2014 08:52:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T+LxNMX5f3Fs for ; Fri, 14 Feb 2014 08:52:20 -0800 (PST) Received: from qmta02.westchester.pa.mail.comcast.net (qmta02.westchester.pa.mail.comcast.net [76.96.62.24]) by olra.theworths.org (Postfix) with ESMTP id 655ED431FBD for ; Fri, 14 Feb 2014 08:52:13 -0800 (PST) Received: from omta15.westchester.pa.mail.comcast.net ([76.96.62.87]) by qmta02.westchester.pa.mail.comcast.net with comcast id SGFo1n0011swQuc51GsDum; Fri, 14 Feb 2014 16:52:13 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta15.westchester.pa.mail.comcast.net with comcast id SGqC1n00R152l3L3bGqDSb; Fri, 14 Feb 2014 16:50:13 +0000 Received: from mjolnir.tremily.us (unknown [192.168.0.140]) by odin.tremily.us (Postfix) with ESMTPS id 51CF6103A9A4; Fri, 14 Feb 2014 08:50:12 -0800 (PST) Received: (nullmailer pid 18388 invoked by uid 1000); Fri, 14 Feb 2014 16:48:57 -0000 From: "W. Trevor King" To: notmuch@notmuchmail.org Subject: [PATCH v4 3/4] nmbug-status: Encode output using the user's locale Date: Fri, 14 Feb 2014 08:48:54 -0800 Message-Id: X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1 In-Reply-To: References: In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1392396733; bh=LTXTVJ2Zy7/0quX/ecDWSzs3ksPc1HfCMrrf2wLtn3Y=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-Id; b=JVl6m2X/18QZZJ55lWhA2GvJ/h0gE3W91wfrjcYxobEtReqrDm/VuYSk5XknRu/aY kzm1MloUq87mHwLrIWVFMiHvzCjGQdEVE2Lwf9SOb2LQ4EcqeWGxJznmoPE8RrR3jR cbIh4+Yo5Y9HWiq5bsbfCD38xRy12LT/zcLkV654i9cHOIx6OBkn/o5Hh8g8OwlxSE xdbHwOBKJ2ANkDPUep3W9Y7Oj6XzJTzHHMqf4cIPEZkUW1tO+G0Qu8lalK7wFAocl9 8l06dWyctkMJWSKSRyS5bRu4UcylGbZpv7ZQqxoKeccyYrOeIQxAgH23ssKh43/ejy sR7Vs9FW8GhJg== Cc: Tomi Ollila X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 16:52:26 -0000 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 ;). --- devel/nmbug/nmbug-status | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index 018f191..c4532f1 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