Re: ascii string comparison [Re: use C locale for LC_CTYPE]

"corvid" <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <20111105184519.GA29292@local>
Johannes wrote:
> Hm, what's the point of the dynamic check? We don't
> want our case insensitive compare function to depend on the user locale, 
> so I would say using strcasecmp(3) and tolower(3) is just wrong in our
> case - even if it happens to return the right values in some setups.
> Why not just use a custom function as in the first patch?

I was curious whether something closer to what Jorge was talking about
would turn out to be more pleasing in some way, and maybe a tad quicker,
for that matter, with their optimized functions, but...yeah, it didn't
really look nicer to me, either.

> Or maybe
> test for strncasecmp_l() in configure and provide a custom solution
> if it doesn't exist?

I'm willing to give that a look as well. At first I was reluctant to
have extra locale calls when the string functions are so cheap to
begin with, but...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.