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