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 9C204429E25 for ; Tue, 13 Sep 2011 21:38:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, 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 kZ36J3wQGfMi for ; Tue, 13 Sep 2011 21:38:25 -0700 (PDT) Received: from mail-gx0-f171.google.com (mail-gx0-f171.google.com [209.85.161.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 06EBC431FB6 for ; Tue, 13 Sep 2011 21:38:24 -0700 (PDT) Received: by gxk22 with SMTP id 22so1476748gxk.2 for ; Tue, 13 Sep 2011 21:38:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=rMVs2heN2wkhOFHnEEDbL15kZng0rCK29rpzIwxLqF8=; b=TBiZUy5PAdLA4zfybfBBaywONxZ59abz93l9ZzRYK/LbIdG2LIgNaQXZ8MabhLpOV+ 1V5y/c0CcT+Rlygmr7HggwFTkhUkCnvijVAImyPzNCzpqL6dQbzdhjvF7lo51lJjnGpC aKBofrTl4pxsNqMrLg3WZuMu1iYX058DLj4IY= Received: by 10.90.248.38 with SMTP id v38mr1715101agh.56.1315975103394; Tue, 13 Sep 2011 21:38:23 -0700 (PDT) Received: from isil.kanru.info (61-30-10-70.static.tfn.net.tw [61.30.10.70]) by mx.google.com with ESMTPS id w16sm5937550anl.2.2011.09.13.21.38.20 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Sep 2011 21:38:22 -0700 (PDT) Sender: Kan-Ru Chen Received: from localhost ([127.0.0.1] helo=isil.kanru.info) by isil.kanru.info with esmtp (Exim 4.76) (envelope-from ) id 1R3hEm-0001NC-CK; Wed, 14 Sep 2011 12:38:16 +0800 From: Kan-Ru Chen To: Martin Owens Subject: Re: Unicode Paths In-Reply-To: <1315972539.2201.11.camel@delen> (Martin Owens's message of "Tue, 13 Sep 2011 23:55:39 -0400") Date: Wed, 14 Sep 2011 12:38:12 +0800 Message-ID: <8739fzwxfv.fsf@isil.kanru.info> References: <1315972539.2201.11.camel@delen> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Cc: Notmuch developer list 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: Wed, 14 Sep 2011 04:38:26 -0000 Martin Owens writes: > Hello Again, > > I notice in the lib code notmuch_database_open(), > notmuch_database_create() these functions use const char *path for the > directory path input. Is this unicode safe? > > The python bindings (and ctype docs) seem to suggest using something > called 'wchar_t *' for accepting unicode but that's for C not C++. > > Is this something that should be patched? I think as long as the path does not contain embedded null character then it is safe. Most posix filesystem does not allow null character in the filename so you cannot use UTF-16 or UTF-32 to encode the unicode path. -- Kanru