|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2004, 2023, 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
|
@@ -45,6 +45,10 @@ public static void main(String[] args) throws Exception {
|
45 | 45 | }
|
46 | 46 | String workDir = args[0];
|
47 | 47 | String premainClass = args[1];
|
| 48 | + boolean isCygwin = false; |
| 49 | + if (args.length == 3 && args[2].equals("CYGWIN")) { |
| 50 | + isCygwin = true; |
| 51 | + } |
48 | 52 |
|
49 | 53 | String manifestFile = workDir + fileSeparator + "MANIFEST.MF";
|
50 | 54 | String bootClassPath = "boot" + suffix();
|
@@ -94,7 +98,12 @@ public static void main(String[] args) throws Exception {
|
94 | 98 | */
|
95 | 99 | f = new File(workDir + fileSeparator + "boot.dir");
|
96 | 100 | try (FileOutputStream out = new FileOutputStream(f)) {
|
97 |
| - out.write(bootDir.getBytes(filePathEncoding)); |
| 101 | + if (osName.startsWith("Windows") && isCygwin) { |
| 102 | + out.write(bootDir.getBytes("UTF-8")); |
| 103 | + } |
| 104 | + else { |
| 105 | + out.write(bootDir.getBytes(filePathEncoding)); |
| 106 | + } |
98 | 107 | }
|
99 | 108 | }
|
100 | 109 |
|
@@ -131,39 +140,39 @@ private static String suffix() {
|
131 | 140 | // Use null if encoding isn't used.
|
132 | 141 | String[][] names = {
|
133 | 142 | { "UTF-8", unicode, "" },
|
134 |
| - { "windows-1256", null, "" }, |
| 143 | + { "Cp1256", null, "" }, |
135 | 144 | { "iso-8859-6", arabic, null },
|
136 | 145 | { "GBK", s_chinese, s_chinese },
|
137 | 146 | { "GB18030", s_chinese, s_chinese },
|
138 | 147 | { "GB2312", s_chinese, null },
|
139 |
| - { "x-windows-950", null, t_chinese }, |
140 |
| - { "x-MS950-HKSCS", null, t_chinese }, |
141 |
| - { "x-euc-tw", t_chinese, null }, |
| 148 | + { "MS950", null, t_chinese }, |
| 149 | + { "MS950_HKSCS_XP", null, t_chinese }, |
| 150 | + { "EUC-TW", t_chinese, null }, |
142 | 151 | { "Big5", t_chinese, null },
|
143 | 152 | { "Big5-HKSCS", t_chinese, null },
|
144 | 153 | { "windows-1251", null, "" },
|
145 | 154 | { "iso-8859-5", russian, null },
|
146 | 155 | { "koi8-r", russian, null },
|
147 |
| - { "windows-1253", null, "" }, |
| 156 | + { "Cp1253", null, "" }, |
148 | 157 | { "iso-8859-7", greek, null },
|
149 |
| - { "windows-1255", null, "" }, |
150 |
| - { "iso8859-8", hebrew, null }, |
151 |
| - { "windows-31j", null, japanese }, |
| 158 | + { "Cp1255", null, "" }, |
| 159 | + { "iso-8859-8", hebrew, null }, |
| 160 | + { "MS932", null, japanese }, |
152 | 161 | { "x-eucJP-Open", japanese, null },
|
153 |
| - { "x-EUC-JP-LINUX", japanese, null }, |
| 162 | + { "EUC-JP-LINUX", japanese, null }, |
154 | 163 | { "x-pck", japanese, null },
|
155 |
| - { "x-windows-949", null, korean }, |
| 164 | + { "MS949", null, korean }, |
156 | 165 | { "euc-kr", korean, null },
|
157 |
| - { "windows-1257", null, "" }, |
| 166 | + { "Cp1257", null, "" }, |
158 | 167 | { "iso-8859-13", lithuanian, null },
|
159 |
| - { "windows-1250", null, "" }, |
| 168 | + { "Cp1250", null, "" }, |
160 | 169 | { "iso-8859-2", czech, null },
|
161 |
| - { "windows-1254", null, "" }, |
| 170 | + { "Cp1254", null, "" }, |
162 | 171 | { "iso-8859-9", turkish, null },
|
163 |
| - { "windows-1252", null, "" }, |
| 172 | + { "Cp1252", null, "" }, |
164 | 173 | { "iso-8859-1", spanish, null },
|
165 | 174 | { "iso-8859-15", spanish, null },
|
166 |
| - { "x-windows-874", null, thai }, |
| 175 | + { "MS874", null, thai }, |
167 | 176 | { "tis-620", thai, null },
|
168 | 177 | };
|
169 | 178 |
|
|
0 commit comments