Bohl's Blog

my digital life

trouble with GetCommandLineW

I noticed that ffmpeg has changed the handling of command line arguments (cf. release notes). It now uses GetCommandLineW - in order to get unicode text (e.g. for filenames), which is a good thing I guess. However, at least for me I cannot pass a percent sign ("%") on the command line any more, e.g. something like

winffmpeg -i test.avi image%5d.jpg


What I get from GetCommandLineW in this case is

 "S:\SVN\WINFFMPEG\Build\Debug\winffmpeg.exe" winffmpeg -i test.avi image].jpg


...which is not what I would expect.

I read through the insightfull articel here - but it does not mention that the precent sign is interpreted in some way.

Well, funny and I do not get it.

My first idea is to turn the exe into a unicode project - could this save us all this kind of trouble?

Kommentar schreiben