Brian Willoughby
2013-Mar-18 02:53 UTC
[flac-dev] Patch to add Unicode filename support for win32 flac
On Mar 17, 2013, at 03:57, LRN wrote:> /me looks at chmod and utime wrappers: > Ah, i knew i've missed something! :) > Also, i didn't consider wildcards (i thought shell was supposed to > handle them...).I believe that shell does handle wildcards on all Unix variants, including OSX. Since Windows does not handle them, I suggest that the main flac code not be littered with code that's not necessary on the primary platforms. Aren't Windows users accustomed to this feature being missing anyway? Brian
Erik de Castro Lopo
2013-Mar-18 06:55 UTC
[flac-dev] Patch to add Unicode filename support for win32 flac
Brian Willoughby wrote:> I believe that shell does handle wildcards on all Unix variants, > including OSX.Yes.> Since Windows does not handle them, I suggest that the > main flac code not be littered with code that's not necessary on the > primary platforms.No, the flac code will not be "littered with code that's not necessary on the primary platforms". There will be some windows specific code in a new file, a bunch of replacements of existing fopen() calls with flac_fopen() (similarly for chmod and utime) and the main function for the flac and metaflac executables will have an additional: #ifdef _WIN32 if (!convert_argv_to_utf8(&argc, &argv)) flac__utils_printf(stderr, 1, "ERROR: yada yada\n"); #endif This is a small un-obtrusive change that I fully support. I would however like to see it sooner rather than later so we can get this damn thing released :-). Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
JonY
2013-Mar-18 09:35 UTC
[flac-dev] Patch to add Unicode filename support for win32 flac
On 3/18/2013 14:55, Erik de Castro Lopo wrote:> Brian Willoughby wrote: > >> I believe that shell does handle wildcards on all Unix variants, >> including OSX. > > Yes. > >> Since Windows does not handle them, I suggest that the >> main flac code not be littered with code that's not necessary on the >> primary platforms. > > No, the flac code will not be "littered with code that's not necessary > on the primary platforms". > > There will be some windows specific code in a new file, a bunch of > replacements of existing fopen() calls with flac_fopen() (similarly > for chmod and utime) and the main function for the flac and metaflac > executables will have an additional: > > #ifdef _WIN32 > if (!convert_argv_to_utf8(&argc, &argv)) > flac__utils_printf(stderr, 1, "ERROR: yada yada\n"); > #endif > > This is a small un-obtrusive change that I fully support. > > I would however like to see it sooner rather than later so we can get > this damn thing released :-). >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. -------------- 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/45ccab4e/attachment-0001.pgp
Seemingly Similar Threads
- Patch to add Unicode filename support for win32 flac
- Patch to add Unicode filename support for win32 flac
- Patch to add Unicode filename support for win32 flac
- Patch to add Unicode filename support for win32 flac
- Patch to add Unicode filename support for win32 flac