You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/01/09 10:24:51 UTC

[GitHub] alamar commented on a change in pull request #5725: IGNITE-10732 Force -Dfile.encoding=UTF-8

alamar commented on a change in pull request #5725: IGNITE-10732 Force -Dfile.encoding=UTF-8 
URL: https://github.com/apache/ignite/pull/5725#discussion_r246328674
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
 ##########
 @@ -1387,6 +1392,20 @@ private void validateCommon(IgniteConfiguration cfg) {
         A.ensure(cfg.getNetworkSendRetryCount() > 0, "cfg.getNetworkSendRetryCount() > 0");
     }
 
+    /**
+     * Check whether UTF-8 is the default character encoding.
+     * Differing character encodings across cluster may lead to erratic behavior.
+     */
+    private void checkFileEncoding() {
+        String encodingDisplayName = Charset.defaultCharset().displayName(Locale.ENGLISH);
+
+        if (!"UTF-8".equals(encodingDisplayName)) {
 
 Review comment:
   Even if encoding is consistent between nodes, it might lead to data corruption when Unicode strings are encoded to 8-bit encoding and then de-encoded. Some characters will turn into ?'s as they're not representable in a given 8-bit charset. Therefore, we should keep the warning. They may still run but they need to be aware. We have quite a few warnings anyway which are printed even with default configuration.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services