Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 12536 invoked from network); 17 Jul 2007 13:33:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jul 2007 13:33:49 -0000 Received: (qmail 14217 invoked by uid 500); 17 Jul 2007 12:31:51 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 14181 invoked by uid 500); 17 Jul 2007 12:31:51 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 14163 invoked by uid 99); 17 Jul 2007 12:31:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2007 05:31:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ehuels@gmail.com designates 64.233.162.224 as permitted sender) Received: from [64.233.162.224] (HELO nz-out-0506.google.com) (64.233.162.224) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2007 05:31:48 -0700 Received: by nz-out-0506.google.com with SMTP id l8so1020502nzf for ; Tue, 17 Jul 2007 05:31:27 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TGkmjiq0wI3ygDK8E4vPNp6//afMWIeS3naYTEQbWK/i0KQov0Buevb0KbvkNg92Nah0l4NAEYL5zpLgMvYGN1quPUm9ENlGB88hvZYg+QI6mMLF8MNISC3qy/LI+kJxvjPcHv+WkFTIgRmxBVjt95haUkab8gjKADem9JUAx4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TNjWhrNaOTsAGAByNBo/hqYp4crkxCk1RId35LidSAqCdaCuW+0eIgdBwCod/uiPioI9F5wSOW+CkGL+Tl+/gbZezAt+hmqjYCy1a54vFawXgArwGEA84WMm9z+R28eWfkur1k9jEqui5ApW6zNjjKOR6XiId03iuEyOjIjrnHc= Received: by 10.142.99.21 with SMTP id w21mr27862wfb.1184675487370; Tue, 17 Jul 2007 05:31:27 -0700 (PDT) Received: by 10.143.11.4 with HTTP; Tue, 17 Jul 2007 05:31:27 -0700 (PDT) Message-ID: Date: Tue, 17 Jul 2007 14:31:27 +0200 From: "Erik Huelsmann" To: "APR Developer List" Subject: Re: apr_filepath_encoding on Darwin In-Reply-To: <20070717122529.GB2587@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070717122529.GB2587@redhat.com> X-Virus-Checked: Checked by ClamAV on apache.org On 7/17/07, Joe Orton wrote: > On Tue, Jul 17, 2007 at 02:14:25PM +0200, Erik Huelsmann wrote: > > Reading [1], I conclude that applications should pass UTF-8 to BSD > > functions such as stat() at all times. This suggests to me that > > apr_filepath_encoding() should return APR_FILEPATH_ENCODING_UTF8. > > > > Yet, looking at the sources, on any Unixy system, it returns > > APR_FILEPATH_ENCODING_LOCALE. > > > > Is this an oversight, or am I missing something else? > > This is deliberate; on Unix the character set used for filenames is > dictated by the locale settings (e.g. LC_CTYPE), by convention. There > is certainly no Unix standard which dictates that all filenames must be > UTF-8-encoded Unicode, so APR cannot enforce that. I didn't mean to imply this should apply to any unix, but the Darwin docs do seem to say that this is the standard on Darwin. Doesn't APR adhere to what's standard on Windows in its Windows incarnation? By analogy, shouldn't it do the same for Darwin? I'm not suggesting this should apply to any other Unix than Darwin and the docstring for apr_filepath_encoding allows it to return other values than _LOCALE. bye, Erik.