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:
* var number = 1000;
* 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);
* 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>

View File

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

View File

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

View File

@ -61,7 +61,7 @@ import sun.security.ssl.SSLLogger;
* co.uk
* k12.ak.us
* com.tw
* \u7db2\u8def.tw
* 網路.tw
*
* 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:
* <code>myAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_A)</code>
* 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".
*
* @since 1.3

View File

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

View File

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

View File

@ -128,7 +128,7 @@ public class UriImportExport {
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");
// invalid

View File

@ -131,7 +131,7 @@ public class ValidateISO4217 {
*/
{"GS", "GBP", "826", "2"}, // South Georgia And The South Sandwich Islands
/* 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
/* Not defined in ISO 4217 list, but added in ISO 3166 country code list */
{"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
* symbol under HOST provider is \u00A5, the yen (yuan) sign.
* symbol under HOST provider is ¥, the yen (yuan) sign.
*/
@Test
@EnabledOnOs(WINDOWS)

View File

@ -135,7 +135,7 @@ public final class FileAssociations {
// To test unicode arguments on Windows manually:
// 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
// change the system locale to "Bulgarian (Bulgaria)"
// 3. reboot Windows and re-run the test

View File

@ -33,7 +33,7 @@ package pkg;
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>.
*/
public C field = null;

View File

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