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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:27:54+00:00 2026-05-11T17:27:54+00:00

I have an HTML form generated by JSF which maps an input element to

  • 0

I have an HTML form generated by JSF which maps an input element to a bean setter
and it looks to me like JSF is garbling unicode input on the way in. In particular I put the following exception for testing purposes in the setter

public void setTitle(String title){
    System.out.println("title set with: "+title+"\n");
    if (title.startsWith("xxx")) {
        throw new RuntimeException("debug exception "+title);
    }
    this.title = title;
}

Then I put the following text into the form title input element: “xxxx 海陆”. Then when I submit the form I see the log print

title set with: xxxx ????? 

(on a unicode compatible mac terminal).
And I get an error message on the response HTML page:

Error setting property 'title' in bean of type   
uk.ac.lancs.e_science.sakaiproject.api.blogger.post.Post: 
java.lang.RuntimeException: debug exception xxxx ���??

Any clues on what’s wrong? Am I just full of it and have the wrong diagnosis?
I think I’ve eliminated all other possibilities. Unicode seems to work fine in other components of the same application.

  • 1 1 Answer
  • 1 View
  • 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-11T17:27:54+00:00Added an answer on May 11, 2026 at 5:27 pm

    Questions I would be asking:

    • How is the form encoding the request (application/x-www-form-urlencoded or multipart/form-data)? Multi-part data will be decoded using a 3rd party MIME parser, so there is scope for trouble there. If the data is url-encoded, is it being escaped properly?
    • What charsets is the browser accepting?
    • What encoding is the server detecting? Is it a Unicode character set?
    • Is it just the logging that is writing as a lossy encoding (e.g. MacRoman)? What default charset is the server using?

    Since what you see on a console isn’t necessarily what is in the string, you can dump the Unicode code points using this code:

      public static void printCodepoints(char[] s) {
        for (int i = 0; i < s.length; i++) {
          int codePoint = Character.isHighSurrogate(s[i]) ? Character
              .toCodePoint(s[i], s[++i])
              : s[i];
          System.out.println(Integer.toHexString(codePoint));
        }
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 117k
  • Answers 117k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer page = (number_of_records_before_RECORD / number_of_records_per_page) + 1 In other words.… May 11, 2026 at 10:48 pm
  • Editorial Team
    Editorial Team added an answer You can double the range by casting the value to… May 11, 2026 at 10:48 pm
  • Editorial Team
    Editorial Team added an answer Read here. The current release is marked as Stable (and… May 11, 2026 at 10:48 pm

Related Questions

I have a listbox on an HTML form with a Submit button. The listbox
There are many examples on the internet of doing this type of thing. But
Background: This is a request for something that may not exist yet, but I've
I have a task in hand that requires me to send a form to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.