From c3c6ab15499b6438c452ffe02f498515ac9a37fe Mon Sep 17 00:00:00 2001 From: Mark Gillard Date: Thu, 28 Sep 2023 01:01:11 +0300 Subject: [PATCH 1/2] Clarify that key comparison is ordinal (closes #966) --- CHANGELOG.md | 1 + toml.md | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14d3cebc..1912a999 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Seconds in Date-Time and Time values are now optional. - Allow non-English scripts in unquoted (bare) keys - Clarify newline normalization in multi-line literal strings. +- Clarify that key comparison is ordinal (i.e. does no Unicode normalization) ## 1.0.0 / 2021-01-11 diff --git a/toml.md b/toml.md index 08cc9f67..83a542bd 100644 --- a/toml.md +++ b/toml.md @@ -205,6 +205,19 @@ spelling = "favorite" "spelling" = "favourite" ``` +Keys are considered identical if their code point sequences are the same. +It is possible to create distinct keys that appear visually identical. Doing so is discouraged: + +```toml +# VALID BUT DISCOURAGED + +# prénom = "Françoise", using NFC +"pr\u00e9nom" = "Françoise" + +# prénom = "Françoise", using NFD +"pr\u0065\u0301nom" = "Françoise" +``` + As long as a key hasn't been directly defined, you may still write to it and to names within it. From 27cc1d446a6c7ef2905f2787f9683e9e750cb84f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 22:19:19 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- toml.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toml.md b/toml.md index 83a542bd..201d174d 100644 --- a/toml.md +++ b/toml.md @@ -205,8 +205,9 @@ spelling = "favorite" "spelling" = "favourite" ``` -Keys are considered identical if their code point sequences are the same. -It is possible to create distinct keys that appear visually identical. Doing so is discouraged: +Keys are considered identical if their code point sequences are the same. It is +possible to create distinct keys that appear visually identical. Doing so is +discouraged: ```toml # VALID BUT DISCOURAGED