From 0075ec27fb93b8be28285ef479c429ed7b5fe51c Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 6 Sep 2021 12:32:49 +0800 Subject: [PATCH] [TD-6443]: Support OpenTSDB HTTP JSON data import format --- src/client/src/tscParseOpenTSDB.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscParseOpenTSDB.c b/src/client/src/tscParseOpenTSDB.c index a35d289647..c2a58e1315 100644 --- a/src/client/src/tscParseOpenTSDB.c +++ b/src/client/src/tscParseOpenTSDB.c @@ -521,7 +521,8 @@ int32_t parseValueFromJSON(cJSON *root, TAOS_SML_KV *pVal) { case cJSON_String: { //convert default JSON String type to nchar pVal->type = TSDB_DATA_TYPE_NCHAR; - pVal->length = wcslen((wchar_t *)root->valuestring) * TSDB_NCHAR_SIZE; + //pVal->length = wcslen((wchar_t *)root->valuestring) * TSDB_NCHAR_SIZE; + pVal->length = strlen(root->valuestring); pVal->value = tcalloc(pVal->length + 1, 1); memcpy(pVal->value, root->valuestring, pVal->length); break; -- GitLab