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 E08F6429E34 for ; Mon, 5 Dec 2011 13:19:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 J+gzn+wtG-fr for ; Mon, 5 Dec 2011 13:19:47 -0800 (PST) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 08F55429E33 for ; Mon, 5 Dec 2011 13:19:46 -0800 (PST) Received: by mail-ey0-f181.google.com with SMTP id l13so1423797eaa.26 for ; Mon, 05 Dec 2011 13:19:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=L16t4iZOSm8FxApinl6zrhW1qzi3SqD7p7lbh8MEG/E=; b=al8J0IoqD9k4xH0OV5ix7QZt0MuqTt95NIkjVynTH/C6NakWIgpEBstmSUS9c6SzwZ ztDIlXWfs+QXEt0hADqikRAFCoDamQKcCg+Z4xVw/sHYNOspr+YGwB/2YpDUQZAQCahu Kn3trw/FKoFSyzTeMJZY0iyxYZZYscR2psLjI= Received: by 10.213.27.205 with SMTP id j13mr1442353ebc.104.1323119986632; Mon, 05 Dec 2011 13:19:46 -0800 (PST) Received: from localhost (cpc1-sgyl2-0-0-cust548.18-2.cable.virginmedia.com. [82.41.10.37]) by mx.google.com with ESMTPS id x12sm63197484eef.9.2011.12.05.13.19.44 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Dec 2011 13:19:45 -0800 (PST) From: Patrick Totzke To: notmuch@notmuchmail.org Subject: [PATCH 3/3] errors='ignore' when decode to unicode Date: Mon, 5 Dec 2011 21:19:29 +0000 Message-Id: <1323119969-1485-4-git-send-email-patricktotzke@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1323119969-1485-1-git-send-email-patricktotzke@gmail.com> References: <1323119969-1485-1-git-send-email-patricktotzke@gmail.com> 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: Mon, 05 Dec 2011 21:19:48 -0000 --- bindings/python/notmuch/message.py | 2 +- bindings/python/notmuch/thread.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index fac575c..4790663 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -425,7 +425,7 @@ class Message(object): header = Message._get_header(self._msg, header) if header == None: raise NotmuchError(STATUS.NULL_POINTER) - return header.decode('UTF-8') + return header.decode('UTF-8', errors='ignore') def get_filename(self): """Returns the file path of the message file diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py index 3e59b35..ddefade 100644 --- a/bindings/python/notmuch/thread.py +++ b/bindings/python/notmuch/thread.py @@ -326,7 +326,7 @@ class Thread(object): authors = Thread._get_authors(self._thread) if authors is None: return None - return authors.decode('UTF-8') + return authors.decode('UTF-8', errors='ignore') def get_subject(self): """Returns the Subject of 'thread' @@ -339,7 +339,7 @@ class Thread(object): subject = Thread._get_subject(self._thread) if subject is None: return None - return subject.decode('UTF-8') + return subject.decode('UTF-8', errors='ignore') def get_newest_date(self): """Returns time_t of the newest message date -- 1.7.4.1