@@ -96,6 +96,18 @@ final class Target_jdk_internal_util_StaticProperty {
96
96
@ RecomputeFieldValue (kind = RecomputeFieldValue .Kind .Reset )//
97
97
private static String JAVA_PROPERTIES_DATE ;
98
98
99
+ @ Alias //
100
+ @ RecomputeFieldValue (kind = RecomputeFieldValue .Kind .Reset )//
101
+ private static String STDIN_ENCODING ;
102
+
103
+ @ Alias //
104
+ @ RecomputeFieldValue (kind = RecomputeFieldValue .Kind .Reset )//
105
+ private static String STDERR_ENCODING ;
106
+
107
+ @ Alias //
108
+ @ RecomputeFieldValue (kind = RecomputeFieldValue .Kind .Reset )//
109
+ private static String STDOUT_ENCODING ;
110
+
99
111
@ Alias //
100
112
@ RecomputeFieldValue (kind = RecomputeFieldValue .Kind .Reset )//
101
113
private static String SUN_JNU_ENCODING ;
@@ -193,6 +205,10 @@ final class Target_jdk_internal_util_StaticProperty {
193
205
NATIVE_ENCODING = p .getInitialProperty ("native.encoding" );
194
206
FILE_ENCODING = p .getInitialProperty ("file.encoding" );
195
207
JAVA_PROPERTIES_DATE = p .getInitialProperty ("java.properties.date" );
208
+ STDIN_ENCODING = p .getInitialProperty ("stdin.encoding" );
209
+ STDERR_ENCODING = p .getInitialProperty ("stderr.encoding" );
210
+ STDOUT_ENCODING = p .getInitialProperty ("stdout.encoding" );
211
+
196
212
SUN_JNU_ENCODING = p .getInitialProperty ("sun.jnu.encoding" );
197
213
JAVA_LOCALE_USE_OLD_ISO_CODES = p .getInitialProperty ("java.locale.useOldISOCodes" , "" );
198
214
@@ -297,6 +313,24 @@ public static String javaPropertiesDate() {
297
313
return JAVA_PROPERTIES_DATE ;
298
314
}
299
315
316
+ @ Substitute
317
+ public static String javaStdinEncoding () {
318
+ assert Objects .equals (STDIN_ENCODING , SystemPropertiesSupport .singleton ().getInitialProperty ("stdin.encoding" ));
319
+ return STDIN_ENCODING ;
320
+ }
321
+
322
+ @ Substitute
323
+ public static String javaStdoutEncoding () {
324
+ assert Objects .equals (STDOUT_ENCODING , SystemPropertiesSupport .singleton ().getInitialProperty ("stdout.encoding" ));
325
+ return STDOUT_ENCODING ;
326
+ }
327
+
328
+ @ Substitute
329
+ public static String javaStderrEncoding () {
330
+ assert Objects .equals (STDERR_ENCODING , SystemPropertiesSupport .singleton ().getInitialProperty ("stderr.encoding" ));
331
+ return STDERR_ENCODING ;
332
+ }
333
+
300
334
@ Substitute
301
335
public static String jnuEncoding () {
302
336
assert Objects .equals (SUN_JNU_ENCODING , SystemPropertiesSupport .singleton ().getInitialProperty ("sun.jnu.encoding" ));
0 commit comments