[FFmpeg-devel] [PATCH] lavc: make invalid UTF-8 in subtitle output a non-fatal error

wm4 nfxjfg at googlemail.com
Fri Jun 28 11:32:44 CEST 2013

On Fri, 28 Jun 2013 11:00:12 +0200
Nicolas George <nicolas.george at normalesup.org> wrote:

> Success is not guaranteed in that you can not be sure to get the right
> encoding, but you will always succeed in finding at least one
> encoding that can work, since there are common encodings, including
> plain ISO-8859-1, that can accept any byte sequence.

In fact, that's what usually happens. I'm not sure how that is
supposed to be better than just letting the subtitle decoder output
data in an unknown codepage.

> Also, you have only answered half the question: what do you intend to
> do with the decoded subtitles. If garbaged output suits you, do not

Render them on the screen.

> bother decoding the subtitles, read them directly from /dev/urandom.

This is not a realistic or useful option.

> > I have the impression that you still believe the charset problem can
> > be solved perfectly. This is not the case. Such problems are very
> > common even today, and just showing an error message (or even
> > dropping broken text) won't help.
> Please provide a realistic scenario where you believe the encoding
> problem can not be "solved perfectly" and where your proposal would
> have helped.

I did. You replied that I made assumptions that suit my point.

More information about the ffmpeg-devel mailing list