users@javaserverfaces.java.net

Scrambled umlauts in input text field

From: Holger Stenzhorn <holger.stenzhorn_at_gmail.com>
Date: Thu, 01 Nov 2012 00:34:23 +0100

Hello all,

Using Mojarra 2.1.14, I have created the following JSF page (see [1])
and managed bean (see [2]).

When I open that page then the umlauts ("äöü") on the command button are
displayed correctly.
Now I enter those same umlauts in the input text field and click on the
button (see "before.png").
The page is redisplayed with the umlauts in the input text field
scrambled ("äöü") (see "after.png").

Am I forgetting to do a certain setting here or is this a (possibly
known) bug or issue?
Thanks in advance for your help!

Regards,
Holger

[1]
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:body>
<h:form>
<h:inputText value="#{bean.value}"/>
<h:commandButton action="/pages/temp" value="äöü"/>
</h:form>
</h:body>
</html>

[2]
package some.example;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean(name="bean")
@RequestScoped
public class Bean {

private String value;

public String getValue() {
return value;
}

public void setValue(String value) {
this.value = value;
}
}



before.png
(image/png attachment: before.png)

after.png
(image/png attachment: after.png)