--- src/main/util.c 2011-09-27 07:06:43 +0000 +++ src/main/util.c 2011-09-27 07:09:07 +0000 @@ -25,6 +25,7 @@ #include #include /* for isspace */ +#include #undef COMPILING_R @@ -1260,7 +1261,7 @@ Rboolean utf8Valid(const char *str) { - return (_pcre_valid_utf8(str, strlen(str)) < 0); + return (_pcre_valid_utf8(str, strlen(str))==PCRE_UTF8_ERR0); }