Hi,
I'm coming back on this issue because non ISO-8859-1 charset is not well supported. Since form does not declare any meta tag, browser may serialize it with inappropriate charset.
For instance, if I post a UTF-8 form which contains an input with value "é", the original POST will contain
%C3%A9 sequence, which is a correct UTF-8 encoding of "é". The
escapeHtml4 will then encode it as
é. When returned to browser for final POST (after authentication), the browser will read this
é and import as Unicode U+00E9, and then serialize it as ISO-8859-1 sequence
%E9. This will make pac4j generate a HTTP 500 error because of exception when trying to invoke
getRequestParameter() method. Exception cause is:
Character decoding failed. Parameter [sample] with value [�] has been ignored. Note that the name and value quoted here may be corrupted due to the failed decoding. Use debug level logging to see the original, non-corrupted values.As Moritz says, a meta tag would be a safe way to fix this.
I prepared the PR #3635 that adds a meta tag in form.
Best Regards
Nicolas