--- /dev/null
+Return-Path: <wking@tremily.us>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 85EE2431FC2\r
+ for <notmuch@notmuchmail.org>; Sun, 29 Mar 2015 09:39:05 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.338\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.338 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_NONE=-0.0001]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id dOZ1PH1xt+k3 for <notmuch@notmuchmail.org>;\r
+ Sun, 29 Mar 2015 09:39:02 -0700 (PDT)\r
+Received: from resqmta-ch2-09v.sys.comcast.net\r
+ (resqmta-ch2-09v.sys.comcast.net [69.252.207.41])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 4B048431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 29 Mar 2015 09:39:02 -0700 (PDT)\r
+Received: from resomta-ch2-01v.sys.comcast.net ([69.252.207.97])\r
+ by resqmta-ch2-09v.sys.comcast.net with comcast\r
+ id 9Udb1q00826dK1R01Uf1hm; Sun, 29 Mar 2015 16:39:01 +0000\r
+Received: from odin.tremily.us ([67.168.81.176])\r
+ by resomta-ch2-01v.sys.comcast.net with comcast\r
+ id 9Ucz1q0063oF5yT01UczZJ; Sun, 29 Mar 2015 16:37:01 +0000\r
+Received: by odin.tremily.us (Postfix, from userid 1000)\r
+ id 344AD16F724D; Sun, 29 Mar 2015 09:36:58 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
+ t=1427647018; bh=cMWZiFbLowP+ASopR1kvaZLYYxWy+p8Vk5vEAWwpIRc=;\r
+ h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
+ b=RlzYHFSTHzsPOHOD1GKBqPQ+kKia7Zi2779THSjwpv1Y1kf57hlVuysus7S9uUfvb\r
+ IKlnA5GR4KBHLc67qPbC7zGMSa2Ofh18i7XsW9+p9ztvov+HCaRCx0A2SO7euPTzhu\r
+ WzKPAi/RLTSSPb4YqvJBny1BcyPXbnP7XLABrGK8=\r
+Date: Sun, 29 Mar 2015 09:36:58 -0700\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: Sebastian Fischmeister <sfischme@uwaterloo.ca>\r
+Subject: Re: UnicodeDecodeError with python API\r
+Message-ID: <20150329163658.GK22036@odin.tremily.us>\r
+References: <874mp4q7e7.fsf@uwaterloo.ca>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha1;\r
+ protocol="application/pgp-signature"; boundary="P8VDRTGkfyc6BSVj"\r
+Content-Disposition: inline\r
+In-Reply-To: <874mp4q7e7.fsf@uwaterloo.ca>\r
+OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
+ url=http://tremily.us/pubkey.txt\r
+User-Agent: Mutt/1.5.23 (2014-03-12)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+ s=q20140121; t=1427647141;\r
+ bh=vHyaNQMLHyT3aM26hQwl5+2RVsLu3r3Rx4JFDdKoy5U=;\r
+ h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
+ MIME-Version:Content-Type;\r
+ b=C8FN9hmtgEMnOooSI1UIHlwaniIkckokQVwXmdkYuozutqgzT7foiCGvEI4su9J7S\r
+ 0snUEsjIBBu1I2Hpm0ZgzMogFn87jYIwQLKPj6uqoSBxj8gJDmTgCXaqWNcP1kI1WA\r
+ 4GjdjDs7NRT3cu5/O19GF22RY1KsVMzpwfgS7jIGk2AtQBS4dwEt3oxjNIYaou6oOH\r
+ XSEl16m3z58fwWbaT1QE2mDmV1RKIDX9YKdWz0lAwqroQqqtOpb+PYE98V+WWcS8+o\r
+ eqjf5yfEcM3CmjKtTYvARGG9zfetG9AEdiTW96O8+Hy1aKc6ACgRG3jUtoqqN4DA83\r
+ VWPOJmpb9Zd0w==\r
+Cc: notmuch <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 29 Mar 2015 16:39:05 -0000\r
+\r
+\r
+--P8VDRTGkfyc6BSVj\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Sun, Mar 29, 2015 at 09:08:28AM -0400, Sebastian Fischmeister wrote:\r
+> Traceback (most recent call last):\r
+> File "./test.py", line 66, in <module>\r
+> print(type(y.get_part(1)))\r
+> =E2=80=A6\r
+> File "/usr/lib/python3.4/email/parser.py", line 54, in parse\r
+> data =3D fp.read(8192)\r
+> File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode\r
+> return codecs.ascii_decode(input, self.errors)[0]\r
+> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3447=\r
+: ordinal not in range(128)\r
+\r
+My first guess is that the file's encoding doesn't match your locale.\r
+Do you have a non-ASCII locale set? You can check with:\r
+\r
+ $ locale\r
+ LANG=3Den_US.UTF-8\r
+ LC_CTYPE=3D"en_US.UTF-8"\r
+ LC_NUMERIC=3D"en_US.UTF-8"\r
+ LC_TIME=3D"en_US.UTF-8"\r
+ LC_COLLATE=3DC\r
+ LC_MONETARY=3D"en_US.UTF-8"\r
+ LC_MESSAGES=3D"en_US.UTF-8"\r
+ LC_PAPER=3D"en_US.UTF-8"\r
+ LC_NAME=3D"en_US.UTF-8"\r
+ LC_ADDRESS=3D"en_US.UTF-8"\r
+ LC_TELEPHONE=3D"en_US.UTF-8"\r
+ LC_MEASUREMENT=3D"en_US.UTF-8"\r
+ LC_IDENTIFICATION=3D"en_US.UTF-8"\r
+ LC_ALL=3D\r
+\r
+Although you can obviously have a different preferred language or\r
+Unicode-capable encoding. What you don't want is:\r
+\r
+ # locale\r
+ LANG=3D\r
+ LC_CTYPE=3D"POSIX"\r
+ LC_NUMERIC=3D"POSIX"\r
+ LC_TIME=3D"POSIX"\r
+ LC_COLLATE=3D"POSIX"\r
+ LC_MONETARY=3D"POSIX"\r
+ LC_MESSAGES=3D"POSIX"\r
+ LC_PAPER=3D"POSIX"\r
+ LC_NAME=3D"POSIX"\r
+ LC_ADDRESS=3D"POSIX"\r
+ LC_TELEPHONE=3D"POSIX"\r
+ LC_MEASUREMENT=3D"POSIX"\r
+ LC_IDENTIFICATION=3D"POSIX"\r
+ LC_ALL=3D\r
+\r
+If that's not the problem, could you attach the troublesome message?\r
+Or a minimal example derived from the troublesome message?\r
+\r
+Cheers,\r
+Trevor\r
+\r
+--=20\r
+This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
+For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
+\r
+--P8VDRTGkfyc6BSVj\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: OpenPGP digital signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2\r
+\r
+iQIcBAEBAgAGBQJVGConAAoJEG8/JgBt8ol86+kP/RLld0FbhJa9Y6LTVsUpw/5c\r
+4Q/fEgbnORSJG1n6OQOy+bAG/N0DUZ06t1tR82ICpYdF8pO2cWGjc8mlwkdqRpA/\r
+hXoHCCPRyOGtgeD+qaTYlyWuXWxw95hEb0IyTlRtAYWqKFlyXT1ZwXrx92kXGNJw\r
+SzIH78telKf7IyO0hJBJrlsRxe+f2vqhzTPDC1Av7xhVflm7Jb/3EWtnqOSsA6aW\r
+yKZdb8nJGjdm0/wwJIBFns6kqsTy5TFpr45nmNfmwf8Uxr5cGHWL3tMVnUXofmsX\r
+7Gje2LBbHJX3sU2lKbNonh5O/t+y4cMVrJI4BCSqFqy3JkNA9GuBgoqyjHh6kEXD\r
+VN2bTS/2JlZfraAmgdF7oVZR8J905HTsaGc9PQK53jWubRXESnWSjIiPW/zqG84v\r
+RCV4eGIAN7rZvQU64AvPkrf6+7/qRueo9+r2ct0M6xQ9CzQHkerweBWE39dCS9LJ\r
+57zWjlwDqvSH/LjZEKJLkm7aCDaphXFOg0exPuxDbBeoRu6Gd+GuNABMVn6lnVpN\r
+Iz/zZ2qcMzsOk+y7NOe5v4AxytCH5gEvZMFncIzoLb6NSQ0DrFpBz7hEUZA/M6YG\r
+TIVhrbaofD1BalRZ5qlUK+kE9NnSqJW8q76rNU2sdqHIAs4+Znl8GQSiPNSFq4gN\r
+i5FMDCfejhVOKVDnyX+l\r
+=ga/y\r
+-----END PGP SIGNATURE-----\r
+\r
+--P8VDRTGkfyc6BSVj--\r