Coder Social home page Coder Social logo

CanonicalizeLanguageTag should remove duplicate attributes/keywords in a Unicode extension, consistent with Intl.Locale about proposal-intl-locale HOT 6 CLOSED

tc39 avatar tc39 commented on June 22, 2024
CanonicalizeLanguageTag should remove duplicate attributes/keywords in a Unicode extension, consistent with Intl.Locale

from proposal-intl-locale.

Comments (6)

jswalden avatar jswalden commented on June 22, 2024

I can't find anything in TR35 or RFC 6067 that describes the removal of duplicate attributes/keywords. So it doesn't look like there's anything in TR35 we could invoke to perform this operation, and it has to be hand-rolled -- as this patch does for CanonicalizeLanguageTag, and as Intl.Locale in this specification already does. :-|

from proposal-intl-locale.

jswalden avatar jswalden commented on June 22, 2024

@anba You should probably take a look at and comment on this, seeing as you understand this stuff better than everyone else here. :-)

from proposal-intl-locale.

aphillips avatar aphillips commented on June 22, 2024

@jswalden 6067 says something about this:

Only the first occurrence of an attribute or key conveys meaning in a
language tag. When interpreting tags containing the Unicode locale
extension, duplicate attributes or keywords are ignored in the
following way: ignore any attribute that has already appeared in the
tag and ignore any keyword whose key has already occurred in the tag.

This was intended to allow duplicates to be removed without effect (although I don't think we went on to encourage/permit it).

from proposal-intl-locale.

jswalden avatar jswalden commented on June 22, 2024

@aphillips Yeah, the semantics of a tag with duplicates in it are clear enough even if they aren't removed. Just seems to me if we remove them one place -- and we don't really have a choice about it in Intl.Locale unless we wanted to just insert out-of-band options stringwise at the start of any existing Unicode locale extension, but that seems batty -- we should be consistent and do it everywhere.

from proposal-intl-locale.

aphillips avatar aphillips commented on June 22, 2024

The canonical form is in a specific order. I would just go ahead and remove duplicates - - - extension tags are already long and unwieldy even without useless cruft in them.

from proposal-intl-locale.

zbraniecki avatar zbraniecki commented on June 22, 2024

#83 fixes this.

from proposal-intl-locale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.