Repository navigation
Language tags are case-insensitive. Closes #517 - #528
Conversation
|
My informal testing suggests Chrome and Firefox are case-sensitive, and Edge is case-insensitive. Has this been discussed by the Working Group? |
|
It does not matter what Chrome or Firefox thinks; it matters what BCP 47
thinks; BCP 47 says case insensitive. I speak "en-US", and you want SVG 2
to say that language is different from "en-us"? BCP 47 says the preferred
capitalization is "en-US", but comparisons do not matter.
But Chrome and Firefox recognize that the comparison should be
case-insensitive.
Chrome/Blink is working to make systemLanguage case-insensitive. See
https://bugs.chromium.org/p/chromium/issues/detail?id=869440 and the fsoder
comment on issue #517.
Firefox's nightlies are now case-insensitve. See
https://bugzilla.mozilla.org/show_bug.cgi?id=1480946 and the longsonr
comment on issue #517.
And CSS says the :lang psuedo selector does case insensitive comparisons.
W3C sez
The pseudo-class ':lang(C)' matches if the element is in language C.
Whether there is a match is based solely on the identifier C being either
equal to, or a hyphen-separated substring of, the element's language value,
in the same way as if performed by the '|='
<https://www.w3.org/TR/CSS21/selector.html%23id-selectors#attribute-selectors>
operator. *The matching of C against the element's language value is
performed case-insensitively for characters within the ASCII range.* The
identifier C does not have to be a valid language name.
https://www.w3.org/TR/CSS21/selector.html%23id-selectors#lang
The pseudo-class :lang(C) represents an element that is in language C.
Whether an element is represented by a :lang() selector is based solely on
the element's language value (normalized to BCP 47 syntax if necessary)
being equal to the identifier C, or beginning with the identifier C
immediately followed by "-" (U+002D). *The matching of C against the
element's language value is performed case-insensitively within the ASCII
range.* The identifier C does not have to be a valid language name.
https://drafts.csswg.org/selectors-3/#lang-pseudo
(some emphasis added)
…On Thu, Aug 16, 2018 at 5:58 AM, Eric Willigers ***@***.***> wrote:
My informal testing suggests Chrome and Firefox are case-sensitive, and
Edge is case-insensitive.
Has this been discussed by the Working Group?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#528 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/Ah_aIHpcPGJpsNBA7AEB7HMC1VM1ldBTks5uRWyTgaJpZM4V_FlP>
.
|
ewilligers
left a comment
There was a problem hiding this comment.
The "Document Structure chapter" entry in changes.html should also mention this change.
|
I've added a changelog entry, and I think this is good to merge. @svgeesus Are we ok marking this non-substantive for IP? It's a normative correction, but not really adding any intellectual property. Alternatively, @GLRoylance, if you are a W3C contributor, please link up your W3C & Github accounts following the instructions here: https://labs.w3.org/hatchery/repo-manager/pr/id/w3c/svgwg/528 |
|
There ain't no intellectual property here. The edit only clarifies what BCP 47 says. |
|
Marked as non substantive for IPR from ash-nazg. |
Changed description of systemLanguage matching to make it clear that it is a case-insensitive match rather than an "exact match".