{"schema":"cpc-unicode-answer-v1","question":"Why can a no-break space fail an identifier check?","answer":"U+00A0 is a space. An identifier grammar that accepts U+0020, or that accepts no spaces, does not treat U+00A0 as U+0020. Code points: U+00A0. This describes the scalar. It is not a test of a named language, username field, or compiler. Acceptance was not tested. A non-equivalent fallback is \" \" (ASCII space when a space is allowed). A different scalar. It permits a line break. Exact string match: no. NFC match: no. Appearance and meaning were not tested. Font coverage, shaping, and application acceptance were not tested, so those results are unknown.","unicodeVersion":"18.0.0","purpose":"identifier","citation":"Do not invent a platform-support claim from this data.","page":"/answers/why-a-no-break-space-can-fail-an-identifier/","markdown":"/answers/why-a-no-break-space-can-fail-an-identifier.md","sample":" ","codepoints":[{"codepoint":"U+00A0","name":"NO-BREAK SPACE","displayLabel":"[NBSP]","warnings":["space-or-formatting","no-break-space","identifier-space"],"explanations":[{"id":"no-break-space","title":"No-break space","behavior":"A spacing character that inhibits ordinary line breaking at its position.","limitation":"It resembles an ordinary space and can surprise search, source formatting and wrapping.","fix":"Replace with U+0020 when nonbreaking behavior is unnecessary.","source":"https://www.unicode.org/reports/tr14/","alternatives":[{"value":" ","reason":"Ordinary space","tradeoff":"Permits line breaks; changes layout behavior."}],"evidenceTier":"standards-informed-editorial","evidence":{"behavior":"standards-informed","compatibility":"not-tested","repair":"editorial-guidance"}},{"id":"identifier-space","title":"No-break space in an identifier","behavior":"U+00A0 is a space. An identifier grammar that accepts U+0020, or that accepts no spaces, does not treat U+00A0 as U+0020.","limitation":"This describes the scalar. It is not a test of a named language, username field, or compiler. Acceptance was not tested.","fix":"Use U+0020 when an ASCII space is required. Remove the space when the grammar allows no space.","source":"https://www.unicode.org/reports/tr44/","alternatives":[{"value":" ","reason":"ASCII space when a space is allowed","tradeoff":"A different scalar. It permits a line break."}],"evidenceTier":"standards-informed-editorial","evidence":{"behavior":"standards-informed","compatibility":"not-tested","repair":"editorial-guidance"}}]}],"comparison":{"schema":"cpc-unicode-compare-v1","exactlyEqual":false,"sameNFC":false,"sameNFKC":true,"sameVisualAppearance":"unknown","sameMeaning":"unknown","left":{"codepoints":["U+00A0"],"graphemes":1},"right":{"codepoints":["U+0020"],"graphemes":1},"explanation":"Normalization equivalence does not guarantee the same rendering, semantics or acceptance in an application."},"graphemes":{"status":"available","method":"runtime-intl-segmenter","unicodeDataVersion":"runtime-unknown","count":1,"segments":[{"text":" ","utf16Offset":0,"codepoints":["U+00A0"]}]},"normalizationChanged":{"NFC":false,"NFD":false,"NFKC":true,"NFKD":true},"normalizationUnicodeDataVersion":"runtime-unknown","targetCompatibility":{"status":"unknown","evidenceTier":"not-tested","purpose":"identifier","explanation":"No OS, font, browser, application, field policy or rendering engine was tested. Unicode validity and segmentation do not establish actual display or acceptance."}}