Skip to content

Commit 93211bd

Browse files
Masanori YanoRealCLanger
Masanori Yano
authored andcommitted
8293579: tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java fails on Japanese Windows platform
Backport-of: 121d4a5119f98adf30fa759563eec843a6e37d61
1 parent d6eec8d commit 93211bd

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

test/jdk/tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,19 @@ public final class UnicodeArgsTest {
4848
@Parameter("false")
4949
@Test
5050
public void test8246042(boolean onCommandLine) {
51-
final String testString = new String(Character.toChars(0x00E9));
51+
final String testString;
52+
53+
String encoding = System.getProperty("native.encoding");
54+
switch (encoding) {
55+
default:
56+
testString = new String(Character.toChars(0x00E9));
57+
break;
58+
59+
case "MS932":
60+
case "SJIS":
61+
testString = new String(Character.toChars(0x3042));
62+
break;
63+
}
5264

5365
TKit.trace(String.format("Test string code points: %s", testString
5466
.codePoints()

0 commit comments

Comments
 (0)