[FFmpeg-devel] [PATCH] Support for UTF8 filenames on Windows

Karl Blomster thefluff
Thu Jul 16 19:55:49 CEST 2009

Ramiro Polla wrote:
> Hi,
> On Thu, Jul 16, 2009 at 11:20 AM, Karl Blomster<thefluff at uppcon.com> wrote:
>> Unless I am severely missing something in your updated patch (thanks for the
>> nice work, by the way!) it will not work with the FFmpeg commandline
>> program. If you want an Unicode commandline in Windows you need to use
>> wmain() or _tmain() instead of plain old main(), AFAIK. As I said earlier my
>> original patch was only intended to let the API support Unicode. Working it
>> into ffmpeg.c would be a lot more work, I think.
> How do you test UNICODE support?
> I used attached shell file with msys (sh test_unicode.sh) and it works
> as expected (only the unicode filename without FF_WINUTF8 fails). I
> also tested with an app that used Find(First,Next)FileA() and passed
> the unicode filenames as ascii string to ff_winutf8_open() and it also
> worked as expected.

Plain old cmd.exe (both with and without the chcp 65001 trick). I can do stuff 
like notepad.exe <unicode filename> and it'll work fine, but with ffmpeg it just 
says file not found (and prints a bogus filename). It works fine with mingw's 
sh; MinGW probably does some kind of black magic there to get Unix apps to work 
without having to patch in the Windows mess. The API works fine, of course.

Karl Blomster

More information about the ffmpeg-devel mailing list