[FFmpeg-devel] [RFC] function to check for valid UTF-8 string

Rich Felker dalias
Sun Dec 9 23:09:11 CET 2007

On Sun, Dec 09, 2007 at 11:18:32AM +0100, Reimar D?ffinger wrote:
> Hello,
> since Rich seems to have given up on it, here is a proposed patch
> that adds a av_check_utf8 function that could be used to validate
> input strings.
> Since it hacked it up very quickly please forgive any bugs or other
> stupidity.

Read RFC 3629. There's a very simple way to validate byte sequences
(using the given ABNF) without any decoding required, and it's less
likely to be buggy. Your patch relies on GET_UTF8 not being buggy,
which is quite doubtful IMO..


More information about the ffmpeg-devel mailing list