The is*** functions to check if a char is a digit or space fail if you pass a char that's above 127.
https://en.cppreference.com/w/cpp/string/byte/isalpha
Depending on your compiler you might get an error. You can fix this by casting the value to unsigned char.
Try and match this "Çüéâ" as ASCII.
static int matchdigit(char c)
{
return isdigit((unsigned char)c);
}
static int matchalpha(char c)
{
return isalpha((unsigned char)c);
}
static int matchwhitespace(char c)
{
return isspace((unsigned char)c);
}