On 7/9/06, Rich Felker <dalias at aerifal.cx> wrote:
On Sat, Jul 08, 2006 at 03:32:40AM -0500, Jonathan Beavers wrote:
I'm trying to pass UTF-8 character strings to a stripped-down ffmpeg binary I built, but I can't seem to get av_open_input_file to work. This isn't too surprising,
It is surprising. UTF-8 is completely transparent to apps and should work with no special support whatsoever, except for when it comes to displaying the names on a terminal or in a gui.
I'm pretty new to UTF-8 and Unicode, so I'm probably not a great source on what is surprising or unsurprising! :) At any rate, I was under the impression that UTF-8 was transparent for ASCII characters only, and then non-ASCII characters would require something along the lines of wfopen().
but I'm kind of at the end of my rope trying to figure out how to play with files that have non-latin characters in the name.
Perhaps the encoding on disk is not UTF-8? No mangling of filenames is performed so you must use the on-disk encoding. Or... are you perhaps using windows and not telling us that? In that case it's probably an insurmountible limitation unless you can fix mingw/msvcrt.dll to correctly translate the UTF-8 filenames to the windows-internal UTF-16.
I apologize about this--I'm stuck with Windows. One possible solution that I've seen somewhere on a Cygwin/MinGW mailinglist was that I could continue passing in filenames converted to UTF-8 and then inside my ffmpeg-based program, simply convert the filenames to UTF-16. I'll be sure to send an email to the list with my results, for the sake of posterity... but I'll certainly keep in mind that MinGW just may not play well with non-ASCII text. Thanks, Jon