[FFmpeg-devel] file protocol with Unicode support

Nicolas George nicolas.george at normalesup.org
Thu Apr 14 10:36:02 CEST 2011

Le quintidi 25 germinal, an CCXIX, Kirill Gavrilov a écrit :
> One trick we can do - to check the file exists (assume input is not UTF-8
> string) and convert UTF-8 -> wide char if not.

I was going to suggest something exactly like that.

>						 But this will work only for
> open file operation and file creation will be undefined.

UTF-8 is pretty distinctive, the algorithm: if valid UTF-8 then UTF-8 else
"codepage" should work fine.

> Another solution with backward compatibility is to create the duplicates for
> some entry functions like av_open_input_file() and av_open_input_fileU().
> Thats really how most libraries works (FreeImage for input filenames, FTGL
> to render the text, DevIL has macro to switch all functions).

This is the same idiotic API choice made by microsoft, it leads to all sorts
of problem, this thread is a perfect example of why it is not a good idea.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110414/3a1ca37a/attachment.asc>

More information about the ffmpeg-devel mailing list