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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:14:22+00:00 2026-06-07T10:14:22+00:00

I’m having trouble with character encoding for a web application. There is a pop

  • 0

I’m having trouble with character encoding for a web application. There is a pop up that queryes the database with user input (search a person by name). The problem is that accented characters are being transformed into weird letters like ó => ó. This is a pretty standard problem but I can’t figure out what is going on.

What have I done?

Mainly, follow this.

  • Setting at the first filter on my tomcat (request&response).setCharacterEncoding("UTF-8");
  • Setting every web.xml, server.xml the character encodign parameter <?xml version='1.0' encoding='utf-8'?>.
  • Changing URIEncoding to UTF-8 in the connectors. Using firebug, I already see that content-type is set to text/html; utf-8 on the get posts (which are mainly the ones with problems)
  • Change meta types and @page on the jsp’s to UTF-8.

But I still have the same problems, although some have been solved, for example, some accented letters sent from the server to the client, are displaying correctly.

I have apache2.2 and tomcat 6 installed.

I don’t know what else to do nor what relevant information should I post here (if you need something please tell me)…

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-06-07T10:14:24+00:00Added an answer on June 7, 2026 at 10:14 am

    Make sure that the encoding is also set right at the database and JDBC driver level. How to do that depends on the DB and JDBC driver make/version. Consult the DB and JDBC driver specific documentation for details. For the MySQL JDBC driver for example, you need to add two specific parameters to the JDBC connection URL.

    By the way, setting the XML file encoding and the meta tags have no effect on HTTP request/response encoding. Only the following should be minimally configured for a JSP/Servlet based web application:

    • For HTTP GET requests, configure it at server level. In Tomcat, that’s to be done by setting the URIEncoding attribute of <Connector> in Tomcat’s server.xml.

    • For HTTP POST requests, use a filter which does a ServletRequest#setCharacterEncoding().

    • For HTTP responses generated by JSPs, set pageEncoding attribute of <%@page%> on a per-JSP basis, or, better, set <page-encoding> entry in web.xml for an application-wide basis.

    • For HTTP responses generated by servlets (wherein no JSP is been involved!) use ServletResponse#setCharacterEncoding().

    • Last but not least, make sure that your source code files are also saved as UTF-8. The exact configuration depends on the editor used. In case of Eclipse, you can control it via Window > Properties > General > Workspace > Text File Encoding.

    See also:

    • Unicode – How to get the characters right?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a

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.