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

Karl Blomster thefluff
Wed Aug 5 00:43:56 CEST 2009

Ramiro Polla wrote:
> On Tue, Jul 28, 2009 at 1:32 AM, Ramiro Polla<ramiro.polla at gmail.com> wrote:
>> On Wed, Jul 22, 2009 at 10:11 PM, Ramiro Polla<ramiro.polla at gmail.com> wrote:
>>> On Tue, Jul 21, 2009 at 7:22 PM, Diego Biurrun<diego at biurrun.de> wrote:
>>>> On Tue, Jul 21, 2009 at 05:20:51PM -0300, Ramiro Polla wrote:
>>>>> Ok, then, I need someone to take a look at the build system part (I
>>>>> used FF_EXTRA_OBJS but there are some other combinations with less
>>>>> underscores and I can't tell which one is best). Also another look at
>>>>> the documentation is always welcome.
>>>> Please resend the latest version.
>>> Attached.
>>> Changed UNICODE to Unicode and added a LocalFree() I had forgotten.
>>> There's a #undef __STRICT_ANSI__ in winmain.c because I need the
>>> definitions of __argc and __argv and they're under #ifdef
>>> __STRICT_ANSI__. I could also re-declare as extern.
>> Newer patch that should take care of WinCE.
>> Karl, could you please
>> test the patch to make sure it does what you need?
> ping

Sorry for being so late on responding. It doesn't work here (WinXP 32-bit SP3).

 From os_support.c:
 > +    char *winutf8 = getenv("FF_WINUTF8");
 > +    if (winutf8 && atoi(winutf8)) {

Here, getenv() always returns NULL even if the variable exists, and so the UTF8 
opening path never gets evaluated. Even if getenv() had actually worked properly 
it would have required the variable to exist for the UTF8 opening to be possible 
at all, and I don't think that's a good default behavior. Wasn't it supposed to 
default to UTF8, and you could disable it by setting an environment variable?

Anyway, if I change the condition above to just if (1) it works just fine, so 
that part isn't broken at least.

Karl Blomster

More information about the ffmpeg-devel mailing list