URL encoding with h:outputlink and UTF-8
843844Jan 9 2008 — edited Jan 10 2010Hi all,
I'm using the JSF 1.1 sun impl.
I've some trouble to have the right encoded URL in a h:outputlink.
All my JSF webapp is in UTF-8 but the url (that contains cyrillic chars) in not well encoded.
I found a strange comment in the com.sun.faces.util.HtmlUtils.writeURL(...) java source
" * All characters before the start of the query string will be encoded
* using ISO-8859-1.
* PENDING: Ideally, we'd encode characters before the query string
* using UTF-8, which is what the HTML spec recommends. Unfortunately,
* the Apache server doesn't support this until 2.0. "
It's seems that whatever the charset or encoding my webapp uses, the writeURL(...) method will uses ISO-8859-1 for the beginning of the url. (that not a valid encoding for cyrillic)
I don't understand what Apache server is doing here ?
I'm using Apache 2, so I would like to encode my url with utf-8.
Shouldn't this be parameterized in faces-config for instance ?
Thanks for your help,
NicoG