Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9148199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:12:35+00:00 2026-06-17T11:12:35+00:00

Does SpiderMonkey handle Unicode escapes properly? When I try to print a string with

  • 0

Does SpiderMonkey handle Unicode escapes properly? When I try to print a string with unicode escapes to standard out with SpiderMonkey, it munges them. V8 and Node.JS show output as expected.

Here’s SpiderMonkey:

$ js
js> this.print("\u201cquotes\u201d")
quotes

This is worse than it looks, since the output contains binary data that isn’t valid UTF-8.

Here’s V8, which shows the quotes:

$ v8
V8 version 3.7.0 [sample shell]
> this.print("\u201cquotes\u201d")
“quotes”

Here’s Node.JS, which also shows the quotes:

$ node
> console.log("\u201cquotes\u201d")
“quotes”

Edit: I’m running on Mac OS X 10.8.2 (Mountain Lion).

$ echo $LANG
en_US.UTF-8

$ js --version
JavaScript-C 1.8.5 2011-03-31

$ brew info spidermonkey
spidermonkey: stable 1.8.5, HEAD
https://developer.mozilla.org/en/SpiderMonkey
Depends on: readline, nspr
/usr/local/Cellar/spidermonkey/1.8.5 (101 files, 12M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/spidermonkey.rb
==> Caveats
This formula installs Spidermonkey 1.8.5.
If you are trying to compile MongoDB from scratch, you will need 1.7.x instead.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:12:38+00:00Added an answer on June 17, 2026 at 11:12 am

    Which revision are you running? Checking out mozilla-central on my machine it looks right.

    mozilla-central/js/dbg$ echo $LANG 
    en_US.UTF-8
    mozilla-central/js/dbg$ ./js -e 'this.print("\u201cquotes\u201d")'
    “quotes”
    mozilla-central/js/dbg$ hg log -l1 | head -n1
    changeset:   119130:8cc32d6fa707
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone out there know how to integrate ContentFlow ( http://www.jacksasylum.eu/ContentFlow ) and Lightbox2
does anybody of you know about a good way of building string templates, that
Does anyone know how to convert this string 20.01.2012 09:30:11 to excel date 01/20/2012
According the Spidermonkey's User Guide https://developer.mozilla.org/En/SpiderMonkey/JSAPI_User_Guide ... a jsval by itself does not protect
I'm doing some work with the Parser API in Spidermonkey. The docs show that
Specifically Spidermonkey . I know you write functions and attach them to events to
Does anyone know how could I select a variable from a String in JavaScript?
Does anyone know if there is a way to generate different code in the
Does COUNT(*) have any significant impact for MySQL performance if query already has GROUP
Does anyone have a translate function for x/y positions after rotation in javascript? for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.