diff --git a/java/tsfile/src/main/java/org/apache/tsfile/utils/ReadWriteIOUtils.java b/java/tsfile/src/main/java/org/apache/tsfile/utils/ReadWriteIOUtils.java index 88f1388d5..f5e3e475d 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/utils/ReadWriteIOUtils.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/utils/ReadWriteIOUtils.java @@ -431,7 +431,7 @@ public static int writeVar(String s, ByteBuffer buffer) { return ReadWriteForEncodingUtils.writeVarInt(NO_BYTE_TO_READ, buffer); } int len = 0; - byte[] bytes = s.getBytes(); + byte[] bytes = s.getBytes(TSFileConfig.STRING_CHARSET); len += ReadWriteForEncodingUtils.writeVarInt(bytes.length, buffer); buffer.put(bytes); len += bytes.length;