On 4/13/2010 9:29 AM, Роман Донченко wrote:
> 
> getpwuid_t returns the raw byte representation of the username, which is
> in the locale encoding (well, Unix being byte-oriented, it can be an
> arbitrary binary string, but presumably the sysadmin uses the same
> encoding everywhere).
> 
> The difference is, on Unix, the result of apr_uid_name_get (and many
> other functions, I'm sure) is in the encoding detected by
> apr_os_locale_encoding, while on Windows this may not be the case.

You are correct, and the function is wrong, this is an example where the
explicit FnW() was not used (and should have been).  On most systems, such
data is opaque.  Opaque data, on win32, is oddly unicode.

I'm not disputing your patch, by any means.  I'm interested to hear from
others how it affects their app (such as log4cxx, for example).

Reply via email to