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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:57:26+00:00 2026-06-06T14:57:26+00:00

I have a problem with utf-8 encoding in primefaces 3. but with this (adding

  • 0

I have a problem with utf-8 encoding in primefaces 3. but with this (adding filter for character encoding in web.xml), my problem solved. But I have another filter for primefaces fileupload in my web.xml. In pages that there is fileupload, even without uploading anything, my character encoding filter don’t work and utf-8 character sets with unknown values, just like when there was no filter for uploading. How I can use this filter together?

  • 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-06T14:57:27+00:00Added an answer on June 6, 2026 at 2:57 pm

    This is a bug in PrimeFaces’ MultipartRequest. It’s using the platform default character encoding for form fields instead of the one set in the HTTP servlet request as done by HttpServletRequest#setCharacterEncoding() in your character encoding filter (which I assume is been mapped in web.xml before the PrimeFaces FileUploadFilter).

    Basically, line 85 and 88 of MultipartRequest in PrimeFaces 3.3

    formParams.get(item.getFieldName()).add(item.getString());
    // ...
    items.add(item.getString());
    

    needs to be changed as follows

    formParams.get(item.getFieldName()).add(item.getString(getCharacterEncoding()));
    // ...
    items.add(item.getString(getCharacterEncoding()));
    

    I have reported it as issue 4266. In the meanwhile, your best bet is to manually fix the incorrect string encoding in the backing bean action method as follows, assuming that the server platform default encoding is ISO-8859-1:

    string = new String(string.getBytes("ISO-8859-1"), "UTF-8");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have main page that looks like this: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html
I have a WordPress xml data file encoding with utf-8. But the WordPress impoter
I have problem like this https://dev.twitter.com/discussions/4563 if (webResponse.Headers[Content-Encoding] == gzip) { byte[] bytes =
I have a problem with some symbols in UTF-8 encoding. I am reading the
I have a problem related to this question . I have a web service
I have a problem with encoding when writing XML files via QXmlStreamWriter in windows,
I have problem when creating a file in encoding 'utf-8' and reading it from
I have a database where encoding is UTF-8 for multilingual purpose. I this that
I have problem with one of my validation regex when using nonstandard utf-8 character.
I have small problem. I'm trying to work on an XML file, but the

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.