src/java.base/macosx/native/libjava/java_props_macosx.c
changeset 47352 33ac30e17843
parent 47216 71c04702a3d5
child 50410 01e4ddc3c23f
--- a/src/java.base/macosx/native/libjava/java_props_macosx.c	Mon Oct 16 18:27:07 2017 +0200
+++ b/src/java.base/macosx/native/libjava/java_props_macosx.c	Mon Oct 16 11:20:59 2017 -0700
@@ -113,6 +113,12 @@
     }
 
     if (retVal != NULL) {
+        // convertToPOSIXLocale() does not expect any variant codes, so ignore
+        // '@' and anything following, if present.
+        char* rmAt = strchr(retVal, '@');
+        if (rmAt != NULL) {
+            *rmAt = '\0';
+        }
         return strdup(convertToPOSIXLocale(retVal));
     }