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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:25:20+00:00 2026-05-20T08:25:20+00:00

I have this bind to my textfields onkeyup event: function ajaxSearch(sstring,miszerint,startrow,Valid,notValid) { setTimeout(function query(){

  • 0

I have this bind to my textfields onkeyup event:

function ajaxSearch(sstring,miszerint,startrow,Valid,notValid) {
setTimeout(function query(){
  if (sstring.length <= 3)
  {
      $("#external").html("<p>min 3 chars please.</p>")
  }
  else
  {
    $('#loading').ajaxStart(function() {
      $(this).show()
      $("#external").hide()
    });

    $('#loading').ajaxComplete(function() {
      $(this).hide()
      $("#external").show()
    });

    $.ajax({
        type:"GET",
        url: "/myApp/getStd",
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        dataType:"application/x-www-form-urlencoded; charset=UTF-8",
        data:"sstring="+escape(sstring)+"&options="+miszerint+"&startrow="+startrow+"&valid="+Valid+"&notValid="+notValid+"&searchForm=1",

                async: true,
        success: function(data){
        $("#external").html(data);

        }
     })
   }
},1500)
}

The problem is that when I put hungarian chars (e.g., æőűúíéá”) into the textfield my servlet returns “�” instead of the provided char.

If I query the servlet directly without ajax it works fine.
In the JSP I have defined:

<%@page contentType="text/html" pageEncoding="UTF-8"%>

plus

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

On the servlet I set the response charset to “UTF-8”. Any ideas?

  • 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-20T08:25:21+00:00Added an answer on May 20, 2026 at 8:25 am

    You should use encodeURIComponent() instead of escape() for URL-encoding query parameters. Or, better, provide it as a JS object, then jQuery will worry about URL-encoding.

    data: {
        "sstring": sstring,
        "options": miszerint,
        "startrow": startrow,
        "valid": Valid,
        "notValid": notValid,
        "searchForm": 1
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this script, running on a links list: $('li#linkcat-25 a').bind('click', function (e) {
I have this (simplification): $(li).click(function{alert(test);}); <li> <input> </li> What's the best way to bind
I have a code like this $(document).ready(function(){ $(.add).bind ('click', function () { $('.main').append('<div class=add>Add
i have seen this code: Function.prototype.bind = function (bind) { var self = this;
I have this code. $(document).ready(function() { $('#box').hide(); $(window).bind('scroll', function(){ if($(this).scrollTop() > 200) { $(#box).fadeIn(300);
I have: $(document).ready(function(){ $(#eventsContent).children().each(function(){ $(this).bind(mouseenter, function(){ $(this).css(background,#F5F5F5); }); }); }); I have tried this
I have this array: string[,] productData = new string[5,7]; I bind it to a
I have this kind of code below, how can I bind the visibility of
I have set up a NInject (using version 1.5) binding like this: Bind<ISessionFactory>().ToMethod<ISessionFactory>(ctx =>
I have ten checkboxes and Enum. I want to bind this checkboxes to Enum.

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.