[flac-dev] Patch to add Unicode filename support for win32 flac

JonY 10walls at gmail.com
Mon Mar 18 04:28:31 PDT 2013


On 3/18/2013 19:21, Janne Hyvärinen wrote:
> On 18.3.2013 11:35, JonY wrote:
>> Before anyone does anything, see __wgetmainargs
>> <http://msdn.microsoft.com/en-us/library/ff770599.aspx>.
>>
>> It can expand wildcards. Since it already provides argc/argv/env, it is
>> more a less a drop-in replacement for the main() arguments.
> 
> MSVC also comes with
> http://msdn.microsoft.com/en-us/library/8bch7bkk%28v=vs.80%29.aspx. To
> support unicode with these methods would require somewhat more #ifdef
> code in main. We'd need to change project files to define Unicode
> character set and turn main into _wmain and char *argv to wchar_t *argv.
> Also these are MSVC's internal features, if I'm not mistaken. Other
> compilers on Windows would then require different solutions.
> 

For setargv.obj, it is equivalent to doing "int _dowildcard = 1;" in any
linked object on mingw.

For wmain, regular mingw does not support it, but mingw-w64 does. The
issue is that the former is far more common in the wild.

I still prefer the __wgetmainargs approach, the exact same code can be
used for both mingw and msvc. We don't need to care about 9x, I think.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130318/78e83b41/attachment.pgp 


More information about the flac-dev mailing list