Luca Stancapiano a écrit :
hi.... I've seen that myfaces executes a strange encoding for
characters. If I have something similar:
<h:form> <h:commandLink
action="#{UserNumberBean.log}">
<h:outputText value="#{UserNumberBean.modalita}"/>
<f:param name="id"
value="#{UserNumberBean.modalita}"/>
</h:commandLink>
</h:form>
and UserNumberBean.modalita has 'modalità' as value, I see into the
resulted page this value: modalitâ ,the ascii code instead of
'modalità' as well as for html pages. So when I click on the
link, this value cannot to be decoded. I think about a bug of
HTMLEncoder class... what do you think?
well, à would be correct for an iso-8859-1 encoded response, but
226?? What the encoding used by myfaces in your case. is-8859, utf8?
other? The component just use that encoding to convert characters to
entities. Using &#....; notation is perfectly correct, event for links.
If you have problems with it, it can also comes from the fact you form
submit in an inappropriate encoding. use <h:form acceptcharset="....">
to specify expected encoding by server. Of course, you have to configure
your server the same way. Here at work we force everything to utf-8.