apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: apr_filepath_encoding on Darwin
Date Tue, 17 Jul 2007 12:25:29 GMT
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.

joe

Mime
View raw message