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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:51:00+00:00 2026-05-22T19:51:00+00:00

How to encode/decode utf8 in ajax requests? My page is encoded in iso-8859-1, but

  • 0

How to encode/decode utf8 in ajax requests?

My page is encoded in iso-8859-1, but how can you easily encode the data to utf8 when sending and decode again when reveicing the response?

function Ajax(){
    var _this = this;

    this.url = null;
    this.data = null;
    this.success = null;

    this.global = true;
    this.timeout = JSON_TIMEOUT;
    this.cache = false;
    this.dataType = 'json';
    this.type = 'post';

    this.send = function(){
        var jqxhr = $.ajax({
                url : this.url,
                data : this.data,
                timeout : this.timeout,
                cache : this.cache,
                dataType : this.dataType,
                type : this.type,
                global : this.global
                }
            )
            .success(this.success)
            .error(function(){
                // something
            })
            .complete(function(){

            });
    };
}
  • 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-22T19:51:01+00:00Added an answer on May 22, 2026 at 7:51 pm

    You don’t need to do anything. jQuery’s ajax() function will always transmit the data in UTF-8.

    It doesn’t matter what your page is encoded in because Javascript always uses Unicode internally and properly translates your iso-8859-1 page.

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

Sidebar

Related Questions

Trying to decode an invalid encoded utf-8 html page gives different results in python,
How can I use Speex to encode/decode from within python? Are there any wrappers?
I got Chinese characters encoded in ISO-8859-1, for example 兼 = 兼 Those characters
On my site I'm sending a Location header with UTF-8 encoded Unicode data like
thestring = urllib.quote(thestring.encode('utf-8')) This will encode it. How to decode it?
I need to encode/decode UTF-16 byte arrays to and from java.lang.String . The byte
How do I specify the CRLF encode/decode option in mercurial.ini in Windows? The documentation
Is their a method to encode/decode HTML and URL (in Xcode, using Objective-C)? [NSString
In my application,I successfully managed to encode/decode H264 video and Speex audio using libavcodec
Under ARC, is it possible to encode/decode a CGMutablePathRef (or its non-mutable form) using

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.