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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:33:36+00:00 2026-05-25T23:33:36+00:00

what the built-in or user-defined function that I can use in Javascript or jQuery

  • 0

what the built-in or user-defined function that I can use in Javascript or jQuery to convert from one character encoding to another?

For Example,
FROM “utf-8” TO “windows-1256”
OR
FROM “windows-1256” TO “utf-8”

A practical use of that is if you have a php page with specific character encoding like “windows-1256” that you could not change it according to the business needs and when you use ajax to send a block data from database using json which uses “utf-8” encoding only so you need to convert the ouput of json to this encoding so that the characters and the strings will be displayed well

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-05-25T23:33:37+00:00Added an answer on May 25, 2026 at 11:33 pm

    From the standpoint of a JavaScript runtime environment, there’s really no such thing as character encodings – the messiness of encodings is abstracted away from you. By spec, all JS source text is interpreted as Unicode characters, and all Strings are Unicode.

    As such, there’s no way in JavaScript to represent characters in anything other than Unicode. Look at the methods available on a String instance – you’ll see there’s nothing related to character encoding.

    Because JavaScript runs in Unicode, and all JavaScript strings are stored in Unicode, all AJAX calls will be transmitted over the wire in Unicode. From the jQuery AJAX docs:

    Data will always be transmitted to the server using UTF-8 charset; you must decode this appropriately on the server side.

    Your PHP script is going to have to cope with Unicode input from AJAX calls.

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

Sidebar

Related Questions

All the Python built-ins are subclasses of object and I come across many user-defined
In a large Application is there any way to distinguish user-defined classes with built-in
I have a model that has a ForeignKey to the built-in user model in
I currently have built a system that checks user IP, browser, and a random-string
I've created an SQL user defined function to determine if a given date is
Is there a way to get user-defined php functions, variables, constants from a php
I'm trying to create a std::unordered_map, using a user-defined hash function and equality predicate,
I built a simple block module with a select box (where a user can
I have a bunch of user-defined functions that are frequently used in mathematica. I
I have a web-based system built with user login data based on session variables.

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.