--- /dev/null
+Return-Path: <amdragon@mit.edu>\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 50932429E27\r
+ for <notmuch@notmuchmail.org>; Mon, 12 Aug 2013 11:41:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 cCK1a5bDeXuP for <notmuch@notmuchmail.org>;\r
+ Mon, 12 Aug 2013 11:41:15 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu\r
+ [18.7.68.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id ED00A431FD5\r
+ for <notmuch@notmuchmail.org>; Mon, 12 Aug 2013 11:41:02 -0700 (PDT)\r
+X-AuditID: 12074422-b7ef78e000000935-34-52092c3eef9f\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+ by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 72.D0.02357.E3C29025; Mon, 12 Aug 2013 14:41:02 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r7CIepkk011673; \r
+ Mon, 12 Aug 2013 14:40:51 -0400\r
+Received: from drake.dyndns.org (26-4-172.dynamic.csail.mit.edu [18.26.4.172])\r
+ (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r7CIemLR003744\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Mon, 12 Aug 2013 14:40:50 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1V8x2u-0005yW-Kt; Mon, 12 Aug 2013 14:40:48 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/6] lib: Document which strings are returned in UTF-8\r
+Date: Mon, 12 Aug 2013 14:40:35 -0400\r
+Message-Id: <1376332839-22825-3-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1376332839-22825-1-git-send-email-amdragon@mit.edu>\r
+References: <1376332839-22825-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsUixG6nomunwxlk8PqspMX1mzOZHRg9nq26\r
+ xRzAGMVlk5Kak1mWWqRvl8CVsW72eeaCF/wVrz+dY2xgfM3TxcjBISFgIrG1372LkRPIFJO4\r
+ cG89G4gtJLCPUWLRdZkuRi4geyOjxNGm7ywQiSNMEr+/6ELYcxklDrdIgthsAhoS2/YvZwSx\r
+ RQSkJXbenc0KMp9ZQE3iT5cKSFhYwE3i/soN7CA2i4CqxK/DfWAjeQUcJHYvXMkMcYOiRPez\r
+ CWA3cAo4Stxffg5qrYPExl09jBMY+RcwMqxilE3JrdLNTczMKU5N1i1OTszLSy3SNdXLzSzR\r
+ S00p3cQIDhcXpR2MPw8qHWIU4GBU4uHN+MgRJMSaWFZcmXuIUZKDSUmUd5ImZ5AQX1J+SmVG\r
+ YnFGfFFpTmrxIUYJDmYlEd4trEA53pTEyqrUonyYlDQHi5I477OnZwOFBNITS1KzU1MLUotg\r
+ sjIcHEoSvKHaQI2CRanpqRVpmTklCGkmDk6Q4TxAw5tBaniLCxJzizPTIfKnGBWlxHktQBIC\r
+ IImM0jy4Xlg8v2IUB3pFmNcXpIoHmArgul8BDWYCGmzUzAEyuCQRISXVwJhff3uhGEf4fB2T\r
+ lX8Nfh6O2qg/yVn+dsKpGfZf1j750ZZrOEMuosfJa4v18caqTV85TtpcFD8jsS592hmD39P3\r
+ 1X2aXuyX3liq6XvTaMLBmEZ9paunTNZI3Pv44usuuRv71I54yXo8qCh+cmCHs+pLcb1s1q8L\r
+ Fv7nSg6vlDsvcvml6zdbxmtKLMUZiYZazEXFiQBLDSedwgIAAA==\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: Mon, 12 Aug 2013 18:41:20 -0000\r
+\r
+Any string that ultimately comes from notmuch_message_file_get_header\r
+is in UTF-8.\r
+---\r
+ lib/notmuch-private.h | 2 +-\r
+ lib/notmuch.h | 6 +++---\r
+ 2 files changed, 4 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h\r
+index cc55bb9..eced03e 100644\r
+--- a/lib/notmuch-private.h\r
++++ b/lib/notmuch-private.h\r
+@@ -386,7 +386,7 @@ void\r
+ notmuch_message_file_restrict_headersv (notmuch_message_file_t *message,\r
+ va_list va_headers);\r
+ \r
+-/* Get the value of the specified header from the message.\r
++/* Get the value of the specified header from the message as a UTF-8 string.\r
+ *\r
+ * The header name is case insensitive.\r
+ *\r
+diff --git a/lib/notmuch.h b/lib/notmuch.h\r
+index 9fc34ef..998a4ae 100644\r
+--- a/lib/notmuch.h\r
++++ b/lib/notmuch.h\r
+@@ -767,7 +767,7 @@ notmuch_thread_get_messages (notmuch_thread_t *thread);\r
+ int\r
+ notmuch_thread_get_matched_messages (notmuch_thread_t *thread);\r
+ \r
+-/* Get the authors of 'thread'\r
++/* Get the authors of 'thread' as a UTF-8 string.\r
+ *\r
+ * The returned string is a comma-separated list of the names of the\r
+ * authors of mail messages in the query results that belong to this\r
+@@ -781,7 +781,7 @@ notmuch_thread_get_matched_messages (notmuch_thread_t *thread);\r
+ const char *\r
+ notmuch_thread_get_authors (notmuch_thread_t *thread);\r
+ \r
+-/* Get the subject of 'thread'\r
++/* Get the subject of 'thread' as a UTF-8 string.\r
+ *\r
+ * The subject is taken from the first message (according to the query\r
+ * order---see notmuch_query_set_sort) in the query results that\r
+@@ -1013,7 +1013,7 @@ notmuch_message_set_flag (notmuch_message_t *message,\r
+ time_t\r
+ notmuch_message_get_date (notmuch_message_t *message);\r
+ \r
+-/* Get the value of the specified header from 'message'.\r
++/* Get the value of the specified header from 'message' as a UTF-8 string.\r
+ *\r
+ * Common headers are stored in the database when the message is\r
+ * indexed and will be returned from the database. Other headers will\r
+-- \r
+1.7.10.4\r
+\r