[FFmpeg-devel] file protocol with Unicode support
nicolas.george at normalesup.org
Wed Apr 13 12:52:21 CEST 2011
Le quartidi 24 germinal, an CCXIX, Kirill Gavrilov a écrit :
> OK, UTF-16 not so good. But this doesn't make it 'idiotic'.
> Sure bytes order and backward compatibility with ASCII makes UTF-8 most used
Limited range + treacherous variable length + endianness problems + ASCII
incompatibility + need for a new API, I think this is plenty enough to call
> While using char* you need to know in which character encoding is your text.
No you don't. The only people who need to know the character encoding are
those who do linguistic and rendering operations on it. The other ones only
need to pass the string around.
> thats because it is very commonly used like that. From wiki:
Well, not among programmers who are not already twisted by microsoft lingo,
which is the majority here.
> Code page or locale defined system-wide.
> And at another point I don't think that UTF-8 can be used within some locale
> in Windows
> Thats just a terms mismatch. Linux has locales. And in locales code pages
> are defined.
Again, no, there is no such thing. The LC_CTYPE locale defines linguistic
categories and mappings for bytes sequences, that is as far as it goes.
> But 3-4 years ago this was not true and locale mismatch cause the filenames
> and probably something another were displayed wrongly (as abracadabra).
You only get problems if your system is not coherent.
As far as filenames go, ffmpeg never creates nor displays them, it only
passes them around, so there is no place for problem.
As for the solution to your problem, I believe the best solution is to
replace the open call in os_support.c.
Having a different protocol will just make things more messier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel