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

  • SEARCH
  • Home
  • 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 134739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:40:04+00:00 2026-05-11T06:40:04+00:00

I am having trouble escaping special characters in as3. trace( escape(who are ü?) );

  • 0

I am having trouble escaping special characters in as3.

trace( escape('who are ü?') ); 

returns who%20are%20%uFFFD%3F

or

trace( encodeURIComponent('who are ü?') ); 

returns who%20are%20%EF%BF%BD%3F

while in javascript this

alert( encodeURIComponent('who are ü?') ); 

returns who%20are%20%C3%BC%3F

and

alert( escape('who are ü?') ); 

returns who%20are%20%FC%3F

Any suggestions how to get as3 to return escaped special characters as javascript is? Why is as3 apparently choking?

(here is a good reference: http://www.ultrashock.com/forums/actionscript/as3-escape-vs-as2-escape-122046.html )

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T06:40:05+00:00Added an answer on May 11, 2026 at 6:40 am

    Looks like AS is escaping the string as UTF-16, while the Javascript example is escaping as UTF-8. escape doesn’t define how to deal with non-ascii characters, and so it’s been deprecated as of JavaScript 1.5. You should use the function encodeURIComponent instead, which is defined as escaping as UTF-8 – This should be consistent across different implementations. If you require the AS behaviour, I don’t think there is a native function in Javascript, but you can use the functions provided here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble escaping the PHP variable inside the getItems function: while($row = mysql_fetch_array(
Having trouble accessing javascript code in a mixed html/js ajax response. jQuery ajax doc
I'm having real trouble understanding the specification and guidelines on how to properly escape
I'm having some trouble removing slashes in Javascript. I've got some HTML coming through
In Codeigniter/PHP I'm having trouble escaping the instances of $table in the SQL statement
Having trouble getting the javascript alert to display from my code behind. c# -
Calling regex gurus. I'm having some trouble right now with escaping a string in
in Javascript, I am having some trouble replacing '/' with '/' in a string.
I'm having trouble escaping SQL for use in a XML field with the modify()
Having a lot of trouble escaping angle brackets.. $embeds = preg_replace(<!--nextpage-->, '', $embeds, 1);

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.