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

Dave Yeo daveryeo
Sat Jul 18 20:55:54 CEST 2009


On 07/18/09 06:31 am, Reimar D?ffinger wrote:
> On Thu, Jul 16, 2009 at 01:01:31AM -0300, Ramiro Polla wrote:
>>> agree, i also dont like the idea of adding such stuff to random structs
>>
>> Reimar, could you please comment on the replies? If there are no more
>> comments or objections I'll apply it on the weekend.
>
> I don't mind much, it just seems a bit unfortunate that a user might set this
> variable to make one application that is aware of it work with Unicode while
> at the same time completely confusing some older app that wasn't update to even
> know about this new feature (thus libavformat and the app disagreeing which file
> a certain URL refers to).
> Also, I think this will not work with drag-and-drop (e.g. drop a file on ffplay.exe),
> for that you would have to call the GetCommandLineW or what it is called function,
> which gives you the command argc/argv as UTF-16 and convert that to UTF-8 (this
> is IMO the less ugly way, instead of using a _wmain instead of main).

Just wrap the application with a batch file. Same with drag'n'drop. 
Create ffplay.bat or ffplay_utf8.bat which consists of something like
@echo off
set FFMPEG_UTF8=T
ffplay.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
exit

Dave



More information about the ffmpeg-devel mailing list