You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/03/30 11:22:25 UTC

[GitHub] [rocketmq] lizhiboo commented on a change in pull request #4024: Replace Charset.forName("UTF-8") with StandardCharsets.UTF_8

lizhiboo commented on a change in pull request #4024:
URL: https://github.com/apache/rocketmq/pull/4024#discussion_r838427296



##########
File path: example/src/main/java/org/apache/rocketmq/example/openmessaging/SimpleProducer.java
##########
@@ -40,15 +39,15 @@ public static void main(String[] args) {
         System.out.printf("Producer startup OK%n");
 
         {
-            Message message = producer.createBytesMessage("OMS_HELLO_TOPIC", "OMS_HELLO_BODY".getBytes(Charset.forName("UTF-8")));

Review comment:
       Why not use StandardCharsets.UTF_8 ? IMO, some os may use gbk as default decoder. 




-- 
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: dev-unsubscribe@rocketmq.apache.org

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