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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:40:49+00:00 2026-05-17T20:40:49+00:00

My encoding is set to ISO-8859-1. I’m making an AJAX call using jQuery.ajax to

  • 0

My encoding is set to ISO-8859-1.

I’m making an AJAX call using jQuery.ajax to a servlet. The URL (after it has been serialized by jQuery) ends up looking like this:

https://myurl.com/countryAndProvinceCodeServlet?action=getProvinces&label=%C3%85land+Islands

The actual label value is Åland Islands. When this comes to the servlet, the value that I receive is:

Ã\u0085land Islands

But this is not what I want. I’d like it to get decoded to Åland Islands. I’ve tried many things (setting scriptCharset, trying to convert the string using getBytes(), but nothing seems to work).

  • 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-17T20:40:49+00:00Added an answer on May 17, 2026 at 8:40 pm

    It is an unfortunate part of the Servlet specification that the encoding used to decode query parameters is not settable by servlets themselves. Instead it is left as a configuration matter for the server.

    This makes deployment of internationalised web sites an enormous pain, especially because the default encoding chosen by the Servlet spec is not the most-likely-to-be-useful UTF-8, but ISO-8859-1. (Actual ISO-8859-1, not even Windows code page 1252, which is the encoding browsers will really submit when told to use ISO-8859-1!)

    So how to reconfigure this is a server problem. For Tomcat, it requires some fiddling with the server.xml.

    The alternative approach, if you don’t have access to the server config, is to take each submitted parameter name/value and re-encode them. Luckily ISO-8859-1 preserves every byte submitted as a Unicode code point of the same number, so to convert the string as if it had been interpreted properly as UTF-8 in the first place, you can simply encode each String to a byte array using ISO-8859-1, and then decode the bytes back to a String using UTF-8. Of course if someone then re-configures the server to use UTF-8 you’ve got a problem…

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

Sidebar

Related Questions

I am using JPA to access an Oracle database which has its encoding set
I have an XML file with its encoding set within it: <?xml version=1.0 encoding=ISO-8859-15?>
im trying to open a file using StreamReader and ive to set a Encoding,
So I got a site that uses ISO-8859-1 encoding and I can't change that.
I've got java source files with iso-8859-1 encoding. When I run ant , I
I do a call to an oracle stored procedure using JDBCTemplate which has an
Possible Duplicate: Calling a webservice that uses ISO-8859-1 encoding from WCF I am trying
I'm having some issues with using PHP to convert ISO-8859-1 database content to UTF-8.
I have created a plist using .net environment and after the creation I set
How do I properly set the default character encoding used by the JVM (1.5.x)

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.