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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:43:49+00:00 2026-05-15T10:43:49+00:00

I am doing some work for a French client and so need to deal

  • 0

I am doing some work for a French client and so need to deal with accented characters. But I’m running into a lot of difficulty, I am hoping the solution is simple and that somebody can point it out to me.

The string: La Forêt pour Témoin
is converted to: La For? pour T?oin

Note the missing character following the accented character – the t following the ê and the m following the é.

I have tried using StringEscapeUtils which was successful at escaping some characters, such as ă. I have also built my own escape function which produces the same results (ă will work, ê will not).

private String escapeChars(String string) {
    char[] chars = string.toCharArray();
    String result = "";
    for (int i = 0; i < chars.length; i++) {
        int c = chars[i];
        result += "&#" + c + ";";
    }
    return result;
} 

The project is running in eclipse using the App Engine plugin, I cannot narrow down whether the problem is caused by Java, App Engine, or SQLite.

Any help is appreciated.

EDIT: I have found that string are malformed when simply displaying the the request parameter from a form. (ie, request.getParameter(“string”) already has malformed content).

I have tried the meta-tag suggested by Daniel with no success. I think you are on the right track though, the header data of html document follows:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

When accented characters are hard-coded into a JSP they are displayed as intended.

EDIT: I have also added <?xml version="1.0" encoding="UTF-8"?> to the very start of the page.

I am very close to a solution. I have found that if I change the encoding of the page from within the browser form data is passed to the server properly. I cannot figure out how to make the browser auto detect page encoding.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

RESOLVED: I couldn’t work out how to make the browser auto-detect UTF-8 encoding which java defaults to. So I have forced character encoding to ISO-8859-1 using request.setCharacterEncoding(“ISO-8859-1”).

  • 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-15T10:43:49+00:00Added an answer on May 15, 2026 at 10:43 am

    EDIT: I have found that string are malformed when simply displaying the the request parameter from a form. (ie, request.getParameter(“string”) already has malformed content).

    This can have three causes:

    1. It’s a GET request and the server isn’t configured to use UTF-8 to parse request URI. It’s unclear which server you’re using, so here’s a Tomcat-targeted answer as example: set URIEncoding attribute of the HTTP Connector in /conf/server.xml to UTF-8.

    2. If it’s a POST request, then you need to ensure that the servletcontainer uses UTF-8 to encode the request body. You can do that by request.setCharacterEncoding("UTF-8") beforehand.

    3. The console which you’re writing the parameter to doesn’t support UTF-8. It’s unclear which console you’re talking about, so here’s an Eclipse-targeted answer as example: in Window > Preferences > General > Workspace > Text File Encoding set it to UTF-8.

    See also:

    • Unicode – How to get characters right? – Contains detailed answers to various problems.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing some work with Ukkonen's algorithm for building suffix trees, but I'm not
I'm doing some work with registry hives, and I need to know if the
I'm doing some work with code generation, and one of the things I need
I am doing some work for a client and their version of Firefox 4
I'm doing some work with strings, and I have a scenario where I need
I'm doing some work for a client that involves parsing the referrer information from
I'm now doing some work with decoding MP3 files, but just have some basic
I'm doing some work with UIAutomation and need to get the content of an
I'm doing some work where SIMD is required and I need to do operations
I am currently doing some work for a client which happens to be 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.