This is an automated email from the ASF dual-hosted git repository.
menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 3f7a17c Add default client_encoding in PostgreSQLComStartupPacket
(#13406)
3f7a17c is described below
commit 3f7a17c572418de3664c9f6747564ffc0902490d
Author: 吴伟杰 <[email protected]>
AuthorDate: Tue Nov 2 16:12:36 2021 +0800
Add default client_encoding in PostgreSQLComStartupPacket (#13406)
---
.../postgresql/packet/handshake/PostgreSQLComStartupPacket.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/handshake/PostgreSQLComStartupPacket.java
b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/handshake/PostgreSQLComStartupPacket.java
index a695e3a..7f5ac5c 100644
---
a/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/handshake/PostgreSQLComStartupPacket.java
+++
b/shardingsphere-db-protocol/shardingsphere-db-protocol-postgresql/src/main/java/org/apache/shardingsphere/db/protocol/postgresql/packet/handshake/PostgreSQLComStartupPacket.java
@@ -67,7 +67,7 @@ public final class PostgreSQLComStartupPacket implements
PostgreSQLPacket {
* @return client encoding
*/
public String getClientEncoding() {
- return parametersMap.get(CLIENT_ENCODING_KEY);
+ return parametersMap.getOrDefault(CLIENT_ENCODING_KEY, "UTF8");
}
@Override