diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 17a4f72dc74787805bcf816ed6c6b53ffa43b716..2be11a406a3b193147bbe33a8f49f62d3eda108d 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -2700,7 +2700,7 @@ void tscDequoteAndTrimToken(SStrToken* pToken) { // trim leading spaces while (first < last) { char c = pToken->z[first]; - if (isspace(c)) { + if (c != ' ' && c != '\t') { break; } first++; @@ -2709,7 +2709,7 @@ void tscDequoteAndTrimToken(SStrToken* pToken) { // trim ending spaces while (first < last) { char c = pToken->z[last - 1]; - if (isspace(c)) { + if (c != ' ' && c != '\t') { break; } last--; diff --git a/src/util/src/tutil.c b/src/util/src/tutil.c index 7987d95dca4b5ac55db63fd78f52a62aa66d480c..1a73991ade1ea4617fc4d3dab3904652ff46d691 100644 --- a/src/util/src/tutil.c +++ b/src/util/src/tutil.c @@ -223,7 +223,7 @@ char *paGetToken(char *string, char **token, int32_t *tokenLen) { char quote = 0; while (*string != 0) { - if (isspace(*string)) { + if (*string == ' ' || *string == '\t') { ++string; } else { break; @@ -244,12 +244,12 @@ char *paGetToken(char *string, char **token, int32_t *tokenLen) { break; } - if (*string == '#' || isspace(*string)) { + if (*string == '#' || *string == '\n' || *string == '\r') { *string = 0; break; } - if (isspace(*string) && !quote) { + if ((*string == ' ' || *string == '\t') && !quote) { break; } else { ++string;