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 8143299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:05:11+00:00 2026-06-06T13:05:11+00:00

i have output from a server like [alex, \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd] i want to convert it

  • 0

i have output from a server like

["alex", "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"]

i want to convert it like
[“alex”, “to its right language”]
using js or jquery

i tried

function encode_utf8( s )
{
   return unescape( encodeURIComponent( s ) )
}

but not working correctly

any help?
thanks in advance

  • 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-06T13:05:12+00:00Added an answer on June 6, 2026 at 1:05 pm

    I am not sure about what you mean by getting output “LIKE” the shown example…

    but if you get ["alex", "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"] and assign it to a variable like

    var foo = ["alex", "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"];
    // alert(foo[1]) results in "��������" which actually means
    // the engine has at least tried to resolve the characters
    

    for example if you pass in correct character codes like:

    var foo = ["alex", "\u003cp\u003emy UTF paragraph\u003c/p\u003e"];
    // alert(foo[1]) results in "<p>my UTF paragraph</p>" which seems correct to me...
    

    Try the examples above in a browser console (works at least for me in current Chrome)

    On the other hand if you receive "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd" every time then I assume similar to the commentors that your response already gets messed up before you are handling it in JavaScript

    This article shows nicely that using Unicode characters is valid for variable naming so the same should apply to string content.

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

Sidebar

Related Questions

i have one table sql server like below , from that table i want
I have: $page_file_temp = $_SERVER[PHP_SELF]; which will output: /templates/somename/index.php I want to extract from
I have output from grep I'm trying to clean up that looks like: <words>Http://www.path.com/words</words>
I have a response from remote server like this: /home/computer/Downloads |-- /home/computer/Downloads/Apple | `--
i have data that i fetch from an email server i want to eliminate
I would like to clarify how browser scripting (such as javascript/jquery) differs from server
I'm trying to parse an output from a server that looks like this: {
I am working in SQL Server 2008. I have output from for xml explicit
I have an application using sockets.. a client and server program like mySql.. I
Using a backbone model, assuming it fetches some additional properties from the server (like

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.