JDK-8030201 : Nashorn: String.prototype.toLowerCase() requires SpecialCasing support
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_ubuntu
  • CPU: generic
  • Submitted: 2013-12-13
  • Updated: 2015-12-04
  • Resolved: 2015-12-04
Related Reports
Blocks :  
Duplicate :  
Description
FULL PRODUCT VERSION :
Java(TM) SE Runtime Environment (build 1.8.0-ea-b119)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b61, mixed mode)

A DESCRIPTION OF THE PROBLEM :
String.prototype.toLowerCase()  [ES5.1 - 15.5.4.16] needs to apply the additional case folding rules from SpecialCasing.txt. This does not or rather no longer work correctly in Nashorn on Java8. This has regressed because of JDK-8020037.

The bug report for JDK-8020037 looks wrong to me, also see JDK-7036910 for a related discussion.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
jjs> "\u0130".toLowerCase() === "\u0069\u0307"

Expected: true
Actual: false


REPRODUCIBILITY :
This bug can be reproduced always.
Comments
This was fixed by JDK-8042814.
19-09-2014

Clearing fix version 8u20 as we depend on JDK-8041791 in java.lang component. There's just nothing we can do in Nashorn about this.
08-05-2014

Nashorn relies on java.lang.String for case conversion. Implementing our own case conversion code would be a huge undertaking and probably cause more problems than it would fix. We depend on this getting fixed in java.lang.
02-05-2014