[libav-devel] [PATCH 1/2] Replace all usage of strcasecmp/strncasecmp
Diego Biurrun
diego at biurrun.de
Fri Nov 4 18:02:27 CET 2011
On Fri, Nov 04, 2011 at 05:43:50PM +0100, Kostya Shishkov wrote:
> On Fri, Nov 04, 2011 at 04:28:14PM +0000, Måns Rullgård wrote:
> > Diego Biurrun <diego at biurrun.de> writes:
> >
> > > On Fri, Nov 04, 2011 at 03:59:15PM +0000, Måns Rullgård wrote:
> > >> Luca Barbato <lu_zero at gentoo.org> writes:
> > >> > On 11/4/11 8:13 AM, Måns Rullgård wrote:
> > >> >> Luca Barbato<lu_zero at gentoo.org> writes:
> > >> >>> On 11/4/11 6:18 AM, Martin Storsjö wrote:
> > >> >>>> From: Reimar Döffinger<Reimar.Doeffinger at gmx.de>
> > >> >>>>
> > >> >>>> All current usages of it are incompatible with localization.
> > >> >>>> For example strcasecmp("i", "I") != 0 is possible, but would
> > >> >>>> break many of the places where it is used.
> > >> >>>>
> > >> >>>> Instead use our own implementations that always treat the data
> > >> >>>> as ASCII.
> > >> >>>> ---
> > >> >>>
> > >> >>> Seems safe.
> > >> >>
> > >> >> The implementation is ugly.
> > >> >
> > >> > we could use toupper_l maybe?
> > >>
> > >> Ugh no.
> > >
> > > So what should we do?
> >
> > Write it in a non-ugly way of course.
>
> That comment was not really helpful.
Captain Rullgard's first name is "Obvious" :)
Diego
More information about the libav-devel
mailing list