[Ffmpeg-devel] retrieving asf textual info in other languages

Hauke Duden H.NS.Duden
Tue May 17 11:42:42 CEST 2005

M?ns Rullg?rd wrote:

>Hauke Duden <H.NS.Duden at gmx.net> writes:
>>Sorry to intrude here, but UTF-8 is very simple. Why not simply
>>convert it yourself? Below is a simple striaghtforward encode routine
>>from unicode char to UTF-8, if you need one. Since UCS-2 is a subset
>>of Unicode this should work for it as well  Use it as you like.
>This doesn't deal with nasty things like surrogate pairs.

UCS-2 has no surrogate pairs. It is a fixed 2-byte encoding (which does 
not cover the whole Unicode charset). I guess you're thinking about 
UTF-16. If you wanted to handle that then the easiest approach would be 
do first decode the UTF-16 chars into plain Unicode and then re-encode 
them as UTF-8.

I have included some UTF-16 decoding routines in this email. This time 
as an attachment so that the code formatting is not totally messed up.

Again, use this however you want.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: utf.cpp
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050517/7f1fa110/attachment.txt>

More information about the ffmpeg-devel mailing list