Surely this is a glibc bug, not a grep bug. Grep is just following the character classification of glibc. I can reproduce the problem by compiling and running the attached program, which uses only glibc (not grep). This program exits with status 1, whereas you want it to exit with status 0. So I suggest filing a glibc bug report.
#include <locale.h>
#include <regex.h>

static char const combining_acute_accent[] = "\xcc\x81";

int
main (void)
{
  regex_t re;
  if (! setlocale (LC_ALL, "en_US.UTF-8"))
    return 3;
  if (regcomp (&re, "[[:alpha:]]", 0) != 0)
    return 2;
  if (regexec (&re, combining_acute_accent, 0, 0, 0) != 0)
    return 1;
  return 0;
}

Reply via email to