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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:09:33+00:00 2026-05-23T16:09:33+00:00

Possible Duplicate: How to get UTF-8 working in java webapps? I have a servlet

  • 0

Possible Duplicate:
How to get UTF-8 working in java webapps?

I have a servlet that receives in the request parameter some special characters. I tried to display them, but I only get question marks instead.

My query string = http://localhost:8080/specialcharacter/quote/startmilesquote?option=côté

I’m displaying

request.getQueryString()
result= option=c%C3%B4t%C3%A9

and

request.getParameter("option")
result=c�t�

I put

request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");

in the servlet
put <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> in the header of the reponse.
And my connector in server.xml is defined as UTF-8.

   <Connector connectionTimeout="20000" port="8080" 
              protocol="HTTP/1.1" redirectPort="8443"  URIEncoding="UTF-8"/>

How can I solve my problem?

  • 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-23T16:09:34+00:00Added an answer on May 23, 2026 at 4:09 pm

    Make sure the problem is not in displaying, rather than reading:

    • if printing on the console, check if the console has UTF-8 encoding
    • if storing in the database, make sure the DB connection is set to UTF-8

    (Also, make sure you put the request.setCharacterEncoding(..) before you start using the request)

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

Sidebar

Related Questions

Possible Duplicate: Get generic type of java.util.List I have a Map and I want
Possible Duplicate: PHP detecting request type (GET, POST, PUT or DELETE) This should be
Possible Duplicate: Get the Files inside a directory Is there a function that can
Possible Duplicate: Get connecting IP from specified ports that using by other program. If
Possible Duplicate: Get a function's arity Say I have: function a(x) {}; function b(x,y)
Possible Duplicate: Get entire URL, including query string and anchor I have my url
Possible Duplicate: C# - Get a list of files excluding those that are hidden
Possible Duplicate: get python class parent(s) I have a: class Animal(models.Model): pass class Cat(Aminal):
Possible Duplicate: jQuery: get the file name selected from <input type=file /> I have
Possible Duplicate: How to get/set logical directory path in python I have a Python

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.