Re: [PATCH] add stricmp

From: Alan Cox
Date: Thu Sep 08 2005 - 10:40:37 EST


On Iau, 2005-09-08 at 17:28 +0200, Jan Beulich wrote:
> Then how am I supposed to do ASCII-only case-insensitive compares (i.e.
> reading config files)? And why is there a strnicmp? If this is not going

There is no such thing as "ascii" for case sensitivity. The case and
ordering rules are locale not symbol set based and they also depend
totally on the exact semantics of whatever legacy technology you are
interfacing with. I assume you mean "C locale, ascii character set",
which limits your debugger to speaking a subset of American English (no
cafà or naÃve 8))

Any routine of that nature belongs in the user environment to which it
applies, and should be used with care, and preferably pushed to user
space or to a user app on the debug hosting box as kgdb does.

The only general, usable strnicmp safe for general kernel use would be a
full all singing all dancing UTF-8 symbol aware arbitary locale
implementation. And that we *definitely* do not want in kernel.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/