Closed
Bug 536672
Opened 15 years ago
Closed 8 years ago
add ß (eszett)->SS in toUpperCase()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1318403
People
(Reporter: rcampbell, Unassigned)
References
Details
From a discussion in es-discuss, Doug Crockford says,
"15.5.4.16 gives license to transform ß to SS."
e.g., "Straße".toUpperCase() -> "STRASSE"
Comment 1•15 years ago
|
||
I suppose "15.5.4.16" shall relate to ECMA 262 v5 - but that section is about toLowerCase. I see no justification there for this transformation.
Section 15.5.4.18, otoh, is about to UpperCase, which forces the usage of uppercase Unicode letters.
The uppercase version, though, of U+00DF (ß, "LATIN SMALL LETTER SHARP S") would be U+1E9E ("LATIN CAPITAL LETTER SHARP S"), not SS.
Yet again, Unicode defines "Tailored Casing Operations" (http://unicode.org/versions/Unicode5.1.0/#Tailored_Casing_Operations), which has special notes on the ß case:
> * Uppercasing U+00DF ( ß ) LATIN SMALL LETTER SHARP S to the new
> U+1E9E LATIN CAPITAL LETTER SHARP S
>
> However, these tailorings may or may not be desired, depending on the
> implementation in question.
>
> In particular, capital sharp s is intended for typographical representations
> of signage and uppercase titles, and other environments where users require
> the sharp s to be preserved in uppercase. Overall, such usage is rare. In
> contrast, standard German orthography uses the string "SS" as uppercase
> mapping for small sharp s. Thus, with the default Unicode casing operations,
> capital sharp s will lowercase to small sharp s, but not the reverse: small
> sharp s uppercases to "SS". In those instances where the reverse casing
> operation is needed, a tailored operation would be required.
AFAIUI, this means:
"\u00DF".toUpperCase = "SS"
"\u00DF".toLocaleUpperCase = "\u1E9E"
?
Comment 2•15 years ago
|
||
U+1E9E was added to the Unicode standard because it appears to be occasionally used on signage etc. but since the standard orthography does not use it, I don't think you ever want to be transforming U+00DF into it.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•