File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/java.base/share/native/libjava Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 1994, 2018 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 1994, 2021 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -146,7 +146,15 @@ Java_jdk_internal_util_SystemProps_00024Raw_platformProperties(JNIEnv *env, jcla
146
146
PUTPROP (propArray , _path_separator_NDX , sprops -> path_separator );
147
147
PUTPROP (propArray , _line_separator_NDX , sprops -> line_separator );
148
148
149
+ #ifdef MACOSX
150
+ /*
151
+ * Since sun_jnu_encoding is now hard-coded to UTF-8 on Mac, we don't
152
+ * want to use it to overwrite file.encoding
153
+ */
149
154
PUTPROP (propArray , _file_encoding_NDX , sprops -> encoding );
155
+ #else
156
+ PUTPROP (propArray , _file_encoding_NDX , sprops -> sun_jnu_encoding );
157
+ #endif
150
158
PUTPROP (propArray , _sun_jnu_encoding_NDX , sprops -> sun_jnu_encoding );
151
159
152
160
/*
You can’t perform that action at this time.
0 commit comments