New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing wording in String.prototype.toLowerCase() #254

Closed
littledan opened this Issue Dec 15, 2015 · 4 comments

Comments

Projects
None yet
5 participants
@littledan
Member

littledan commented Dec 15, 2015

http://tc39.github.io/ecma262/#sec-string.prototype.tolowercase

For each code point c in cpList, if the Unicode Character Database provides a language insensitive lower case equivalent of c then replace c in cpList with that equivalent code point(s).

A later note clarifies that this is supposed to take SpecialCasing.txt into account, which includes context-sensitive mappings (like Final_Sigma). test262 tests like built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional test for the correct context-sensitive behavior. Why is this written in terms of a character-by-character mapping, rather than just deferring entirely to the Unicode Default Case Algorithms (see page 152 of http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf)?

@caridy

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Dec 16, 2015

Member

@allenwb do you know any relevant history here?

Member

bterlson commented Dec 16, 2015

@allenwb do you know any relevant history here?

@caridy

This comment has been minimized.

Show comment
Hide comment
@caridy

caridy Dec 16, 2015

Contributor

@bterlson this seems to be the case for 402 as well. I don't know the history, but I'm growing fond to the idea of delegating more and more to Unicode Algos. I have two long debates today about this with @littledan and @srl295.

Contributor

caridy commented Dec 16, 2015

@bterlson this seems to be the case for 402 as well. I don't know the history, but I'm growing fond to the idea of delegating more and more to Unicode Algos. I have two long debates today about this with @littledan and @srl295.

@srl295

This comment has been minimized.

Show comment
Hide comment
@srl295

srl295 Dec 16, 2015

Member

Yes, I would support specifying the algorithms in reference to Unicode (not ICU), such as "R1 toUppercase(X)" in the PDF linked by @littledan

Member

srl295 commented Dec 16, 2015

Yes, I would support specifying the algorithms in reference to Unicode (not ICU), such as "R1 toUppercase(X)" in the PDF linked by @littledan

@anba

This comment has been minimized.

Show comment
Hide comment
@anba

anba Aug 28, 2017

Contributor

Fixed in #932

Contributor

anba commented Aug 28, 2017

Fixed in #932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment