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.