RFR: JDK-8282434: Leading combining diacritic character in string renders incorrectly

Jan Lahoda jlahoda at openjdk.org
Mon Jul 18 14:42:04 UTC 2022


There's a group of characters, that add diacritics to the preceding character. JShell wraps String values into double quotes, and so when such a combining character is the first character of a string, there is a double quote followed by the diacritics. On some terminals, it may print the diacritics merged with the double quote.

Sadly, the behavior seems to differ much between terminals, so the proposal here is to use Unicode escape sequences for these characters when they would immediately follow the opening double quote. Sample output:
$1 ==> "\u032Ea"

-------------

Commit messages:
 - JDK-8282434: Leading combining diacritic character in string renders incorrectly

Changes: https://git.openjdk.org/jdk/pull/9540/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9540&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8282434
  Stats: 55 lines in 2 files changed: 36 ins; 0 del; 19 mod
  Patch: https://git.openjdk.org/jdk/pull/9540.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9540/head:pull/9540

PR: https://git.openjdk.org/jdk/pull/9540


More information about the kulla-dev mailing list