--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\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 9B47F431FBD\r
+ for <notmuch@notmuchmail.org>; Tue, 4 Feb 2014 12:06:16 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\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 nxdL+jiJk2K4 for <notmuch@notmuchmail.org>;\r
+ Tue, 4 Feb 2014 12:06:10 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id A32BB431FBC\r
+ for <notmuch@notmuchmail.org>; Tue, 4 Feb 2014 12:06:10 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 3B070100033;\r
+ Tue, 4 Feb 2014 22:06:02 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: "W. Trevor King" <wking@tremily.us>\r
+Subject: Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general\r
+ refactoring\r
+In-Reply-To: <20140204191453.GV14197@odin.tremily.us>\r
+References: <cover.1391424512.git.wking@tremily.us>\r
+ <m2ha8frjgg.fsf@guru.guru-group.fi>\r
+ <20140204005331.GQ14197@odin.tremily.us>\r
+ <m2fvnzp3uh.fsf@guru.guru-group.fi>\r
+ <20140204161142.GS14197@odin.tremily.us>\r
+ <m2a9e6zppp.fsf@guru.guru-group.fi>\r
+ <20140204191453.GV14197@odin.tremily.us>\r
+User-Agent: Notmuch/0.17+55~g4397960 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Tue, 04 Feb 2014 22:06:01 +0200\r
+Message-ID: <m2fvnywsly.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+Cc: 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: Tue, 04 Feb 2014 20:06:16 -0000\r
+\r
+On Tue, Feb 04 2014, "W. Trevor King" <wking@tremily.us> wrote:\r
+\r
+>>=20\r
+>> I don't know what to paste, so i paste this:\r
+>>=20\r
+>> $ python\r
+>> Python 2.6.6 (r266:84292, Nov 21 2013, 12:39:37)=20\r
+>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2\r
+>> Type "help", "copyright", "credits" or "license" for more information.\r
+>\r
+> It looks like you left out:\r
+>\r
+> from __future__ import unicode_literals\r
+>\r
+> Can you try again with that line as the first command?\r
+>\r
+>> >>> data =3D {'from': '\u017b'}\r
+>> >>> print(type(data['from']))=20\r
+>> <type 'str'>\r
+>\r
+> which is why your data is a 'str' and not a 'unicode' instance.\r
+>\r
+>> >>> string =3D ' <td>{from}</td>\n'.format(**data)\r
+>> >>> print string\r
+>> <td>\u017b</td>\r
+\r
+Quick update before getting to sleep:\r
+\r
+$ python=20\r
+Python 2.6.6 (r266:84292, Nov 21 2013, 12:39:37)=20\r
+[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2\r
+Type "help", "copyright", "credits" or "license" for more information.\r
+>>> from __future__ import print_function\r
+>>> from __future__ import unicode_literals\r
+>>> data =3D {'from': '\u017b'}\r
+>>> print(type(data['from']))\r
+<type 'unicode'>\r
+>>> string =3D ' <td>{from}</td>\n'.format(**data)\r
+>>> print(string)\r
+ <td>=C5=BB</td>\r
+\r
+so getting success there\r
+\r
+$ PYTHONPATH=3D$PWD/bindings/python/ ./devel/nmbug/nmbug-status\r
+...\r
+Traceback (most recent call last):\r
+ File "devel/nmbug/nmbug-status", line 318, in <module>\r
+ page.write(database=3Ddb, views=3Dconfig['views'])\r
+ File "devel/nmbug/nmbug-status", line 94, in write\r
+ self._write_view(database=3Ddatabase, view=3Dview, stream=3Dstream)\r
+ File "devel/nmbug/nmbug-status", line 113, in _write_view\r
+ self._write_threads(threads=3Dthreads, stream=3Dstream)\r
+ File "devel/nmbug/nmbug-status", line 215, in _write_threads\r
+ ).format(**message_display_data))\r
+ File "/usr/lib64/python2.6/codecs.py", line 351, in write\r
+ data, consumed =3D self.encode(object, self.errors)\r
+UnicodeEncodeError: 'ascii' codec can't encode character u'\u017b' in\r
+position 176: ordinal not in range(128)\r
+\r
+\r
+I'll dig deeper tomorrow.\r
+\r
+\r
+Tomi\r