apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Huelsmann" <ehu...@gmail.com>
Subject Re: apr_filepath_encoding on Darwin
Date Tue, 17 Jul 2007 12:31:27 GMT
On 7/17/07, Joe Orton <jorton@redhat.com> 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.

Mime
View raw message