Yoann Vandoorselaere wrote:
> > I don't think Chinese users will find it nice if you exclude them from
> > correct functioning of your program because of "performance" or "library
> > size".
>
> I don't think you are qualified to decide in place of the application
> developer whether the application should handle localized input or not.
Hehe, it's my role as gettext maintainer to encourage internationalization :-)
> I'm not advocating to not use them: I'm advocating to let the developer
> choose. Some of the library/program using GnuLib are used in embedded
> system where size matter, and where you won't see anything else than
> standard ASCII as input.
OK, embedded systems. What I can offer, as a compromise, is to introduce
flags like
NO_CHINESE_USERS
NO_JAPANESE_USERS
NO_KOREAN_USERS
NO_TURKISH_USERS
UTF_8_ALL_THE_WAY
so that
- when the first three are defined or the last one is defined, strstr uses
the byte-for-byte implementation,
- when additionally NO_TURKISH_USERS is defined, strcasestr uses the
byte-for-byte implementation,
- when UTF_8_ALL_THE_WAY is defined, iconv becomes a trivial nop.
With names chosen like this, the user of gnulib or of your software will
know explicitly which compromises he's making.
Would you be satisfied with that?
Bruno