8356977: UTF-8 cleanups

Reviewed-by: naoto, prr
This commit is contained in:
Magnus Ihse Bursie 2025-06-04 08:10:42 +00:00
parent b5cfd76c04
commit edf92721c2
13 changed files with 15 additions and 15 deletions

View File

@ -385,10 +385,10 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* {@snippet lang = java: * {@snippet lang = java:
* var number = 1000; * var number = 1000;
* NumberFormat.getCurrencyInstance(Locale.US).format(number); // returns "$1,000.00" * NumberFormat.getCurrencyInstance(Locale.US).format(number); // returns "$1,000.00"
* NumberFormat.getCurrencyInstance(Locale.JAPAN).format(number); // returns "\u00A51,000"" * NumberFormat.getCurrencyInstance(Locale.JAPAN).format(number); // returns "¥1,000""
* var date = LocalDate.of(2024, 1, 1); * var date = LocalDate.of(2024, 1, 1);
* DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG).localizedBy(Locale.US).format(date); // returns "January 1, 2024" * DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG).localizedBy(Locale.US).format(date); // returns "January 1, 2024"
* DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG).localizedBy(Locale.JAPAN).format(date); // returns "2024\u5e741\u67081\u65e5" * DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG).localizedBy(Locale.JAPAN).format(date); // returns "2024年1月1日"
* } * }
* *
* <h2><a id="LocaleMatching">Locale Matching</a></h2> * <h2><a id="LocaleMatching">Locale Matching</a></h2>

View File

@ -239,7 +239,7 @@ class LocaleISOData {
+ "AT" + "AUT" // Austria, Republic of + "AT" + "AUT" // Austria, Republic of
+ "AU" + "AUS" // Australia, Commonwealth of + "AU" + "AUS" // Australia, Commonwealth of
+ "AW" + "ABW" // Aruba + "AW" + "ABW" // Aruba
+ "AX" + "ALA" // \u00c5land Islands + "AX" + "ALA" // Åland Islands
+ "AZ" + "AZE" // Azerbaijan, Republic of + "AZ" + "AZE" // Azerbaijan, Republic of
+ "BA" + "BIH" // Bosnia and Herzegovina + "BA" + "BIH" // Bosnia and Herzegovina
+ "BB" + "BRB" // Barbados + "BB" + "BRB" // Barbados

View File

@ -81,7 +81,7 @@ import sun.util.ResourceBundleEnumeration;
* Keys are case-sensitive. * Keys are case-sensitive.
* {@snippet lang=properties : * {@snippet lang=properties :
* # MessageFormat pattern * # MessageFormat pattern
* s1=Die Platte \"{1}\" enth\u00E4lt {0}. * s1=Die Platte \"{1}\" enthält {0}.
* # location of {0} in pattern * # location of {0} in pattern
* s2=1 * s2=1
* # sample disk name * # sample disk name
@ -93,7 +93,7 @@ import sun.util.ResourceBundleEnumeration;
* # third ChoiceFormat choice * # third ChoiceFormat choice
* s6={0,number} Dateien * s6={0,number} Dateien
* # sample date * # sample date
* s7=3. M\u00E4rz 1996 * s7=3. März 1996
* } * }
* *
* @apiNote * @apiNote

View File

@ -61,7 +61,7 @@ import sun.security.ssl.SSLLogger;
* co.uk * co.uk
* k12.ak.us * k12.ak.us
* com.tw * com.tw
* \u7db2\u8def.tw * 網路.tw
* *
* Public suffixes effectively denote registration authorities. * Public suffixes effectively denote registration authorities.
* *

View File

@ -263,7 +263,7 @@ public interface Action extends ActionListener {
* commonly used to specify a mnemonic. For example: * commonly used to specify a mnemonic. For example:
* <code>myAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_A)</code> * <code>myAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_A)</code>
* sets the mnemonic of <code>myAction</code> to 'a', while * sets the mnemonic of <code>myAction</code> to 'a', while
* <code>myAction.putValue(Action.MNEMONIC_KEY, KeyEvent.getExtendedKeyCodeForChar('\u0444'))</code> * <code>myAction.putValue(Action.MNEMONIC_KEY, KeyEvent.getExtendedKeyCodeForChar('ф'))</code>
* sets the mnemonic of <code>myAction</code> to Cyrillic letter "Ef". * sets the mnemonic of <code>myAction</code> to Cyrillic letter "Ef".
* *
* @since 1.3 * @since 1.3

View File

@ -87,7 +87,7 @@ public class EscapeKeyTyped {
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
printKey(e); printKey(e);
int keychar = e.getKeyChar(); int keychar = e.getKeyChar();
if (keychar == 27) { // Escape character is 27 or \u0021 if (keychar == 27) { // Escape character is 27 or \u001b
escapeKeyTypedReceived = true; escapeKeyTypedReceived = true;
} }
} }

View File

@ -185,7 +185,7 @@ public class RemotePrinterStatusRefresh extends WindowAdapter {
+ "Step 3: Compare the list of printers in \"Before\" and " + "Step 3: Compare the list of printers in \"Before\" and "
+ "\"After\" lists.\n" + "\"After\" lists.\n"
+ " Added printers are highlighted with " + " Added printers are highlighted with "
+ "green color, removed ones \u2014 with " + "green color, removed ones with "
+ "red color.\n" + "red color.\n"
+ "Step 4: Click Pass if the list of printers is correctly " + "Step 4: Click Pass if the list of printers is correctly "
+ "updated.\n" + "updated.\n"

View File

@ -128,7 +128,7 @@ public class UriImportExport {
testUri("file:///foo/bar/doesnotexist"); testUri("file:///foo/bar/doesnotexist");
testUri("file:/foo/bar/doesnotexist"); testUri("file:/foo/bar/doesnotexist");
// file:///foo/bar/\u0440\u0443\u0441\u0441\u043A\u0438\u0439 (Russian) // file:///foo/bar/русский (Russian)
testUri("file:///foo/bar/%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9"); testUri("file:///foo/bar/%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9");
// invalid // invalid

View File

@ -131,7 +131,7 @@ public class ValidateISO4217 {
*/ */
{"GS", "GBP", "826", "2"}, // South Georgia And The South Sandwich Islands {"GS", "GBP", "826", "2"}, // South Georgia And The South Sandwich Islands
/* Not defined in ISO 4217 list, but defined in .properties file. */ /* Not defined in ISO 4217 list, but defined in .properties file. */
{"AX", "EUR", "978", "2"}, // \u00c5LAND ISLANDS {"AX", "EUR", "978", "2"}, // ÅLAND ISLANDS
{"PS", "ILS", "376", "2"}, // Palestinian Territory, Occupied {"PS", "ILS", "376", "2"}, // Palestinian Territory, Occupied
/* Not defined in ISO 4217 list, but added in ISO 3166 country code list */ /* Not defined in ISO 4217 list, but added in ISO 3166 country code list */
{"JE", "GBP", "826", "2"}, // Jersey {"JE", "GBP", "826", "2"}, // Jersey

View File

@ -85,7 +85,7 @@ public class LocaleProvidersFormat {
/* /*
* 8027289: Ensure if underlying system format locale is zh_CN, the Window's currency * 8027289: Ensure if underlying system format locale is zh_CN, the Window's currency
* symbol under HOST provider is \u00A5, the yen (yuan) sign. * symbol under HOST provider is ¥, the yen (yuan) sign.
*/ */
@Test @Test
@EnabledOnOs(WINDOWS) @EnabledOnOs(WINDOWS)

View File

@ -135,7 +135,7 @@ public final class FileAssociations {
// To test unicode arguments on Windows manually: // To test unicode arguments on Windows manually:
// 1. add the following argument ("Hello" in Bulgarian) to the // 1. add the following argument ("Hello" in Bulgarian) to the
// additionalArgs list: "\u0417\u0434\u0440\u0430\u0432\u0435\u0439\u0442\u0435" // additionalArgs list: "Здравейте"
// 2. in Control Panel -> Region -> Administrative -> Language for non-Unicode programs // 2. in Control Panel -> Region -> Administrative -> Language for non-Unicode programs
// change the system locale to "Bulgarian (Bulgaria)" // change the system locale to "Bulgarian (Bulgaria)"
// 3. reboot Windows and re-run the test // 3. reboot Windows and re-run the test

View File

@ -33,7 +33,7 @@ package pkg;
public class C { public class C {
/** /**
* Here is a relative link in a field:\u0130 * Here is a relative link in a field:
* <a href="relative-field-link.html">relative field link</a>. * <a href="relative-field-link.html">relative field link</a>.
*/ */
public C field = null; public C field = null;

View File

@ -25,7 +25,7 @@
* @test * @test
* @bug 6427274 6347778 6469079 * @bug 6427274 6347778 6469079
* @summary Various bugs fixed while writing Compiler API Guide * @summary Various bugs fixed while writing Compiler API Guide
* @author Peter von der Ah\u0081 * @author Peter von der Ahé
* @library ../lib * @library ../lib
* @modules java.compiler * @modules java.compiler
* jdk.compiler * jdk.compiler