Re: _wstat on Windows (actually stat stuff in general)



On Mon, 2011-09-26 at 13:55 +0200, Jernej Simončič wrote:
> On Mon, 26 Sep 2011 08:59:29 +0200, Kean Johnston wrote:
> 
> > So, for stat, we have to do a double conversion: first from the input UTF-8 
> > to UTF-16, and then from UTF-16 to MBCS so that we can call stat instead of 
> > wstat so that users don't get any nasty surprises when using g_stat() on a 
> > symlink in Vista. *le sigh*
> 
> Won't that fail on filenames that have characters outside of the active
> codepage instead?

Couldn't GLib directly use GetFileAttributesExW instead, or does this
have similar issues? It would require a few extra lines of code to fill
in the stat structure, but if it can properly handle arbitrary filenames
and symbolic links, it's probably worth it.

Jürg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]