Javascript doesn't treat Unicode 1D17 as valid identifier character

RESOLVED DUPLICATE of bug 652771

Status

()

Core
JavaScript Engine
RESOLVED DUPLICATE of bug 652771
9 years ago
7 years ago

People

(Reporter: Robert Bowdidge, Unassigned)

Tracking

1.9.2 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.10) Gecko/2009042513 Ubuntu/8.04 (hardy) Firefox/3.0.10
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.10) Gecko/2009042513 Ubuntu/8.04 (hardy) Firefox/3.0.10

Firefox 3.0.10 won't correctly execute Javascript which contains a reference to an identifier containing the Unicode character 1D17.  This character, "Latin Small Letter Bottom Half O" from the Phonetic Extensions set of characters appears to be a valid lowercase letter in the references I've checked, but isn't a valid identifier.

Reproducible: Always

Steps to Reproduce:
1.Load the following web page:
<html>
<body>
<script>

var x = {};
// capital A
x.\u0041 = 3;
// Latin capital N with tilde.
x.PEQE\u00d1A = 3;
// Need more schwa. (upside-down E)
x.t\u018fn = 10;
// latin small letter bottom half O..
x.\u1d17A = 3;
alert(x.\u1d17A);
alert("\u1d17");
</script>
This page should put up two alerts, first "3", then a unicode character.  If the page does
not display these alerts, then the browser does not correctly handle unicode characters
in symbol names.
<hr>
<A HREF="http://homepage.mac.com/rbowdidge">Robert Bowdidge</a>
</body>
</html>

2. Note that you'll get an error on the line referencing unicode character 1D17 in an identifier name.
3.  The same file worked with no errors in Safari 3.2.1 on Mac OS X 10.5.
Actual Results:  
Firefox shows a parse error in the error console when loading this code.

Expected Results:  
No error should have occurred; Safari 3.2.1 generates no error when loading this page.

Looking through the Spidermonkey sources, it appears that the Unicode attribute lookup is thinking this character is "unassigned".
(Reporter)

Comment 1

9 years ago
For what it's worth, the code also fails to run on Opera 9.63 and on IE 6 and IE 7.
Reporter, are you still seeing this issue with Firefox 3.6.11 or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
Whiteboard: [CLOSEME 2010-11-15]
(Reporter)

Comment 3

8 years ago
Still fails on 3.6.11 on Mac OS X 10.5.  I tested both in safe mode and in regular mode.

Updated

8 years ago
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Whiteboard: [CLOSEME 2010-11-15]
Version: unspecified → 1.9.2 Branch
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 652771
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.