You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/07/06 07:43:08 UTC

[GitHub] [shardingsphere] JiekerTime commented on a diff in pull request #18859: fix(charset): fix statement set names

JiekerTime commented on code in PR #18859:
URL: https://github.com/apache/shardingsphere/pull/18859#discussion_r914516459


##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/executor/MySQLSetCharsetExecutor.java:
##########
@@ -60,7 +61,13 @@ private Charset parseCharset(final String value) {
             case "utf8mb4":
                 return StandardCharsets.UTF_8;
             default:
-                return Charset.forName(value);
+                try {
+                    return Charset.forName(value);
+                    // CHECKSTYLE:OFF
+                } catch (Exception ex) {

Review Comment:
   > 
   
   Perhaps you could try executing the statement set names "'utf8'";
   It may cause Charset.forName("\"'utf8'\"");



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org