diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/JsonTagTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/JsonTagTest.java index 47d39b5e1046f15ec3a2d5525a1f9ed8ba9bef34..fe55cd6df76c425b8a38e7e7726e74808f12dcd1 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/JsonTagTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/JsonTagTest.java @@ -1135,7 +1135,7 @@ public class JsonTagTest { } Assert.assertEquals(8, count); - Assert.assertEquals("\"femail\"", s); + Assert.assertEquals("\"收到货\"", s); close(resultSet); } diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/ws/WSJsonTagTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/ws/WSJsonTagTest.java index 666ac910e76d9d1f379d8dfa964a10705bee7097..4709c8586874f8379ac0546eb937139486d06c16 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/ws/WSJsonTagTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/ws/WSJsonTagTest.java @@ -1146,7 +1146,7 @@ public class WSJsonTagTest { } Assert.assertEquals(8, count); - Assert.assertEquals("\"femail\"", s); + Assert.assertEquals("\"收到货\"", s); close(resultSet); } diff --git a/src/os/src/windows/wString.c b/src/os/src/windows/wString.c index 3dd44bb817fa4b1f96b99fba39801fcd508106b9..1d7cfd9af19a73ea2f56530eac3d33493c25c699 100644 --- a/src/os/src/windows/wString.c +++ b/src/os/src/windows/wString.c @@ -93,9 +93,9 @@ int32_t twcslen(const wchar_t *wcs) { } int32_t tasoUcs4Compare(void *f1_ucs4, void *f2_ucs4, int32_t bytes) { - for (int32_t i = 0; i < bytes; i+=4) { - int32_t f1 = *(int32_t *)((char *)f1_ucs4 + i * 4); - int32_t f2 = *(int32_t *)((char *)f2_ucs4 + i * 4); + for (int32_t i = 0; i < bytes; i += TSDB_NCHAR_SIZE) { + int32_t f1 = *(int32_t *)((char *)f1_ucs4 + i); + int32_t f2 = *(int32_t *)((char *)f2_ucs4 + i); if ((f1 == 0 && f2 != 0) || (f1 != 0 && f2 == 0)) { return f1 - f2;