This is an automated email from the ASF dual-hosted git repository.
englefly pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 1a3db44d3eb [fix](statistics)Use utf-8 charset for internal query
result. (#39989)
1a3db44d3eb is described below
commit 1a3db44d3eb6721203a1f72c602a81940422fcb0
Author: Jibing-Li <[email protected]>
AuthorDate: Wed Aug 28 13:13:57 2024 +0800
[fix](statistics)Use utf-8 charset for internal query result. (#39989)
Use utf-8 charset for internal query result.
User's environment may set default java file encode to some other
character set, which may cause internal query get Garbled Characters.
Use utf-8 to decode string bytes from BE.
---
.../java/org/apache/doris/statistics/util/InternalQueryBuffer.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/statistics/util/InternalQueryBuffer.java
b/fe/fe-core/src/main/java/org/apache/doris/statistics/util/InternalQueryBuffer.java
index 257698e2de8..d5a6ca0be80 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/statistics/util/InternalQueryBuffer.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/statistics/util/InternalQueryBuffer.java
@@ -19,6 +19,7 @@ package org.apache.doris.statistics.util;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
/**
* Parse the MySQL protocol result data returned by BE,
@@ -127,7 +128,7 @@ public class InternalQueryBuffer {
public String readStringWithLength() {
byte[] bytes = readBytesWithLength();
if (bytes != null) {
- return new String(bytes);
+ return new String(bytes, StandardCharsets.UTF_8);
}
return null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]