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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:22:06+00:00 2026-06-08T17:22:06+00:00

I am trying to pass data to db via my Jquery application. I have

  • 0

I am trying to pass data to db via my Jquery application. I have serious problems with encoding.

Current page encoding is iso-8859-9. I’ve made my ajax page encoding to iso-8859-9 and passing .ajax data with contentType: "application/x-www-form-urlencoded;charset=ISO-8859-9"

It stores İZİN value as İZİN with every single trying.

Is it work if I create a PHP page and set encoding with headers?

PS: I am processing data on an HTML page. Processor page is an ASP page and using MsSQL db I guess. I don’t have access to processor page or db. Just entering data via form post.

İZİN word and some other similar words are using for sql query at some other pages on WHERE clauses. So I cannot convert characters into HTML codes. I have to use İ as İ.

Thanks for suggestions!

  • 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-08T17:22:07+00:00Added an answer on June 8, 2026 at 5:22 pm

    The application/x-www-form-urlencoded does not have a charset. It’s simply ASCII characters. Specifying charset there will do nothing.

    jQuery will normally urlencode your data as is specified:

    1. Encode to UTF-8
    2. Percent-encode

    So:

    $.post( "test.php", {data: 'İZİN'}); //Shorthand for $.ajax
    

    Actually posts this to server:

    data=%C4%B0Z%C4%B0N
    

    When you access $_POST['data'] with php, they have been turned into bytes (0xC4B05AC4B04E), so echoing them will give you malformed data:

    header("Content-Type: text/html; charset=ISO-8859-9");
    echo $_POST['data'];
    // İZİN
    

    You can test this is true with:

    header("Content-Type: text/html; charset=ISO-8859-9");
    echo "\xC4\xB0\x5A\xC4\xB0\x4E";
    // İZİN
    

    In PHP you need convert it to ISO-8859-9 as soon as you receive it:

    <?php
    header("Content-Type: text/html; charset=ISO-8859-9");
    $data =  "\xC4\xB0\x5A\xC4\xB0\x4E"; //$_POST['data'];
    $proper = mb_convert_encoding( $data, "ISO-8859-9", "UTF-8" );
    echo $proper;
    //İZİN
    

    Note that it’s just much easier to use UTF-8 everywhere because it’s pretty much the best encoding and the web loves it. If you use any other encoding then you will have to be on your toes all the time.

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

Sidebar

Related Questions

I'm trying to make simple script using jquery $post function to pass data to
I'm trying to pass a form's data to my controller method using JQuery Ajax,
I am trying to POST a raw string via jQuery.ajax() e.g., contact_list=352345 I have
I need to perform asp.net web-service function call via jQuery and pass asp.net application
I am trying to pass data around the numpy and boost::ublas layers. I have
I'm trying to pass data from one activity to another via Intent.putExtras like this:
I'm trying to pass a variable via jquery ajax call. I'm not exactly sure
We are trying to pass credentials to our site via jquery ajax (not using
So lately I have been trying ways to pass data from a child to
How can I pass data to a aspx page, via POST and then open

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.