Hello Philippe,
I'm just a user, but from reading the related RFCs, I'm not even certain
that the situation is fully specified. As it seems you can't really have a
definitive way of specifying encoding in URLs and/or URIs, it just looks
unreliable to me. The only thing that seems to be guaranteed to work is
ASCII in URLs. I really don't think it's a Java problem.
I agree there should be a default... but I think it should be avoided as
much as possible. I haven't a single GET in all of my applications that
would require this. I can imagine some use cases, though (e.g. a file
browser).
So I guess you'd need to fill a Jira.
Should there be a single parameter for that, or one for UR[I|L] encoding
and one for the content itself (which should be avoided even more, as the
client is expected to specify the encoding it used)?
Best regards,
Yannick
Le dim. 13 sept. 2015 à 14:10, Philippe Marschall <kustos_at_gmx.net> a écrit :
>
>
> On 10.09.2015 13:08, Yannick Majoros wrote:
> > Hi,
> >
> > 1. You can accept both (and that's mostly automatic and
> > configuration-less), or just accept UTF-8 and throw BadRequestException
> > when browser requests something else. I still can't see the point.
>
> Nope that's not possible. ServletRequest#getParamter (for
> GET/URL-Parameters) needs the URI encoding in advance to decode the
> parameters.
>
> > 2. That's a browser problem, that you can solve with some configurable
> > default, and a standard specification for that can indeed help. But
> that's
> > just a default when a browser fails to ask clearly (which modern one
> really
> > does so nowadays?).
>
> All of them.
>
> > Stating that "configuring a Java EE web application to
> > use UTF-8 has historically not been easy or doable in a portable manner"
> > just isn't true.
>
> You can't configure the encoding to use for URL decoding in a portable
> manner. There are different options in the EG what the spec says what
> the default URL encoding should be. As a consequence different TCK
> compliant implementations have different defaults.
>
> > I do agree with your 4th point, that would be cool.
>
> So how do we proceed from there? So should I file a JIRA?
>
> Cheers
> Philippe
>
--
Yannick Majoros