1 Return-Path: <Sebastian@SSpaeth.de>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 2B989431FD0
\r
6 for <notmuch@notmuchmail.org>; Fri, 16 Sep 2011 03:58:56 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.09 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 RCVD_IN_DNSWL_NONE=-0.0001, T_MIME_NO_TEXT=0.01] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id KgbqkEsJfLfz for <notmuch@notmuchmail.org>;
\r
17 Fri, 16 Sep 2011 03:58:55 -0700 (PDT)
\r
18 Received: from homiemail-a75.g.dreamhost.com (caiajhbdcbbj.dreamhost.com
\r
20 by olra.theworths.org (Postfix) with ESMTP id 9B70B431FB6
\r
21 for <notmuch@notmuchmail.org>; Fri, 16 Sep 2011 03:58:55 -0700 (PDT)
\r
22 Received: from homiemail-a75.g.dreamhost.com (localhost [127.0.0.1])
\r
23 by homiemail-a75.g.dreamhost.com (Postfix) with ESMTP id C89F65EC07E;
\r
24 Fri, 16 Sep 2011 03:58:53 -0700 (PDT)
\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=SSpaeth.de; h=from:to:cc:subject
\r
26 :in-reply-to:references:date:message-id:mime-version:
\r
27 content-type; q=dns; s=sspaeth.de; b=IqEXMWc+vrQ7rebXJP1srrDE/TN
\r
28 es0SoX2x6owQt83pqXH2da6+FbL8JLaqtuWTkwhxHIHraDLTxECZrJ2FHuw5qfUL
\r
29 JFyXoKEX0m6AiYXUISe1iaWFklzL1dY2Th7RwcxEEt2qTvzaH/3KK5CN+Pq3Dd0e
\r
31 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=SSpaeth.de; h=from:to:cc
\r
32 :subject:in-reply-to:references:date:message-id:mime-version:
\r
33 content-type; s=sspaeth.de; bh=yQfH6MPPUSnJr2YUwkpR2oWTE9s=; b=M
\r
34 GgTxorLRPUjfztwofgvPFcn9pCUSac05NiDFCn3OZiZXy9xNTC/OjCAZxJx9jnwm
\r
35 vqbZgtIS51dCPTRkh8yT22iMQLi+hhU27n2Fx6ukQBNhiuS8FS8AaZh4pS3yqObM
\r
36 ICyB/JmmIqOZqgtt4wRO2+DM6ceptR2s74TTq3tBj8=
\r
37 Received: from spaetzbook.sspaeth.de (unknown [84.55.211.141])
\r
38 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
39 (No client certificate requested)
\r
40 (Authenticated sender: fax@sspaeth.de)
\r
41 by homiemail-a75.g.dreamhost.com (Postfix) with ESMTPSA id 099C75EC07C;
\r
42 Fri, 16 Sep 2011 03:58:51 -0700 (PDT)
\r
43 Received: by spaetzbook.sspaeth.de (sSMTP sendmail emulation);
\r
44 Fri, 16 Sep 2011 12:58:49 +0200
\r
45 From: Sebastian Spaeth <Sebastian@SSpaeth.de>
\r
46 To: Austin Clements <amdragon@mit.edu>, Martin Owens <doctormo@gmail.com>
\r
47 Subject: Re: Unicode Paths
\r
49 <CAH-f9WtL4Lwrf2qSzpgeLL5nA_2_mFxUm6cFLmfO9UK_aKmCkg@mail.gmail.com>
\r
50 References: <1315972539.2201.11.camel@delen>
\r
51 <CAH-f9WtL4Lwrf2qSzpgeLL5nA_2_mFxUm6cFLmfO9UK_aKmCkg@mail.gmail.com>
\r
52 User-Agent: Notmuch/0.7-19-gee4579a (http://notmuchmail.org) Emacs/23.2.1
\r
53 (x86_64-pc-linux-gnu)
\r
54 Date: Fri, 16 Sep 2011 12:58:49 +0200
\r
55 Message-ID: <8762ksbvo6.fsf@SSpaeth.de>
\r
57 Content-Type: multipart/signed; boundary="=-=-=";
\r
58 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
59 Cc: Notmuch developer list <notmuch@notmuchmail.org>
\r
60 X-BeenThere: notmuch@notmuchmail.org
\r
61 X-Mailman-Version: 2.1.13
\r
63 List-Id: "Use and development of the notmuch mail system."
\r
64 <notmuch.notmuchmail.org>
\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
68 List-Post: <mailto:notmuch@notmuchmail.org>
\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
72 X-List-Received-Date: Fri, 16 Sep 2011 10:58:56 -0000
\r
75 Content-Transfer-Encoding: quoted-printable
\r
77 On Thu, 15 Sep 2011 13:52:12 -0400, Austin Clements <amdragon@mit.edu> wrot=
\r
79 > On Tue, Sep 13, 2011 at 11:55 PM, Martin Owens <doctormo@gmail.com> wrote:
\r
82 > > I notice in the lib code notmuch_database_open(),
\r
83 > > notmuch_database_create() these functions use const char *path for the
\r
84 > > directory path input. Is this unicode safe?
\r
86 > > The python bindings (and ctype docs) seem to suggest using something
\r
87 > > called 'wchar_t *' for accepting unicode but that's for C not C++.
\r
89 > > Is this something that should be patched?
\r
91 > char* is the correct type for paths on POSIX systems. The *meaning*
\r
92 > of those bytes is a more complicated matter and depends on your locale
\r
93 > settings. On old systems it was generally ASCII, on modern systems
\r
94 > it's generally UTF-8, and it can be many other things. However, as a
\r
95 > consequence of UNIX's C heritage, it is *always* terminated with a
\r
96 > NULL byte and cannot contain embedded NULL's.
\r
98 Right, that's what we are doing, passing in utf-8 encoded unicode
\r
99 strings to char*, which should be just fine if that is what the
\r
100 underlying OS uses.
\r
102 > wchar_t is another matter entirely. wchar_t is the type used by C to
\r
103 > represent wide strings internally, which generally (but not
\r
104 > necessarily!) means it stores a Unicode code point. However, this
\r
105 > isn't an encoding, and different compilers can give wchar_t different
\r
106 > meanings, so wchar_t strings aren't generally appropriate for storing
\r
107 > or sharing between processes or with the kernel.
\r
109 Mmh, I remember I attempted to user wchar_t to pass in unicode objects
\r
110 directly and it had failed miserably.
\r
115 Content-Type: application/pgp-signature
\r
117 -----BEGIN PGP SIGNATURE-----
\r
118 Version: GnuPG v1.4.11 (GNU/Linux)
\r
120 iEYEARECAAYFAk5zK+kACgkQVYX1jMgnoGJF4ACeLfr8tALkONoR/7EP2MfaAOVE
\r
121 vyYAni93lhVz+va98EK7K9z7I6DN0t9l
\r
123 -----END PGP SIGNATURE-----
\r