New issue
Advanced search Search tips

Issue 3109 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2014
HW: ----
NextAction: ----
OS: ----
Priority: ----
Type: ----



Sign in to add a comment

parseInt should treat the BOM character as whitespace

Reported by dark.pa...@gmail.com, Jan 20 2014

Issue description


The following returns `10` for pretty much every JavaScript implementation I've tried except for on V8, where it returns `NaN`:

parseInt('\ufeff' + '10')

\ufeff is the code point for the byte order marker control character. According to sections 7.2 and 7.3 of the ECMA 262 5.1 edition, the BOM character should be treated as whitespace, and in the definition of parseInt in section 15.1.2.2, all leading whitespace should be removed from the input string, which should include the BOM character.

 
Owner: yangguo@chromium.org
Status: Assigned
Status: Fixed
Fixed in r19222

Sign in to add a comment