[FFmpeg-devel] [PATCH] lavu/avstring: add av_get_utf8() function

Stefano Sabatini stefasab at gmail.com
Fri Nov 22 16:57:19 CET 2013


On date Wednesday 2013-11-20 13:02:16 +0100, Stefano Sabatini encoded:
> On date Saturday 2013-11-16 11:57:07 +0100, Nicolas George encoded:
> > Le quartidi 24 brumaire, an CCXXII, Stefano Sabatini a écrit :
> > > Another interface optimization would be to document that *code is set
> > > whenever the sequence is structurally valid, even if the code range is
> > > not accepted.
> > 
> > Not sure how it can be done, since you still need to be able to distinguish
> > cases where the UTF-8 is really invalid.
> 
> I can set the code only in case it is structurally valid, and set the
> output code only in this case (and set it unset otherwise). Check the
> updated test program.
> 
> 
> > OTOH, a flag to automatically return a replacement character when en invalid
> > sequence is detected could be useful, but that can come later.
> 
> The problem is that you need to specify which code to use instead, or
> which sequence. Also for this a separate function should be needed,
> and it's not clear what level of control the function should provide
> before becoming too bloated.
> 
> > 
> > > >From 40a1b7a61d509efe64fdd1c1047fdd1507ab181e Mon Sep 17 00:00:00 2001
> > > From: Stefano Sabatini <stefasab at gmail.com>
> > > Date: Thu, 3 Oct 2013 01:21:40 +0200
> > > Subject: [PATCH] lavu/avstring: add av_utf8_decode() function
> > > 
> > > ---
> > >  doc/APIchanges       |  3 +++
> > >  libavutil/Makefile   |  1 +
> > >  libavutil/avstring.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
> > >  libavutil/avstring.h | 35 ++++++++++++++++++++++++++++
> > >  libavutil/utf8.c     | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> > >  libavutil/version.h  |  2 +-
> > >  6 files changed, 170 insertions(+), 1 deletion(-)
> > >  create mode 100644 libavutil/utf8.c

Applied.
-- 
FFmpeg = Fostering Fast Multimedia Ponderous Embarassing Gargoyle


More information about the ffmpeg-devel mailing list