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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:41:30+00:00 2026-06-18T10:41:30+00:00

I am storing some french content in database but it converted to ? .

  • 0

I am storing some french content in database but it converted to ?.

String : médiévaux, principalement pour l’anglais et le français, is converted to médiévaux, principalement pour l??anglais et le français,

I have applied utf-8 encoding to jsp page, and to the servlets as well.

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

and in servlets

response.setCharacterEncoding("utf-8");

I have also tried with decoding the string

return (string != null) ? new String(string.getBytes(), UTF8_CHARSET) : null;

and then encode it.

return (string != null) ? new String(string.getBytes(UTF8_CHARSET)) : null;

code of getting from JSP and setting it in a servlet

response.setCharacterEncoding("utf-8");
String content = request.getParameter("inputFr");
        if(content == null){
            throw new Exception("exception");
        }

        content = new String(string.getBytes(), UTF8_CHARSET);

but still the question marks appearing in the above content string. Any Help is very much appreciated.

  • 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-18T10:41:32+00:00Added an answer on June 18, 2026 at 10:41 am

    The problem is that you send parameter in the URL that is not encoded. To encode it use
    URLEncoder.encode(content, "UTF-8");. You can decode it in the JSP as

      <%
        out.println(java.net.URLDecoder.decode(((String[])request.getParameterMap().get("inputFr"))[0], "UTF-8"));
      %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my french version of wordpress, i have some untranslated string such as Posted
I have an issue while storing some special character values into db. For e.g.
I have made a tree structure using c and used it for storing some
I am storing and editing some field in a database that involves a long
I have some data stored in a table about a client's language preference but
I'm storing some passwords in a database using PHP+MySQL I realise that MD5 is
I am storing some records in a database. A record has a 'last visited'
I have received this database full of people names and data in French, which
I'm storing some strings within a *.properties file. An example of a string is:
I'm trying to read the flow from the system console but I have some

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.