RFR: 8147962: URL should handle lower-casing of protocol locale-independently

Naoto Sato naoto.sato at oracle.com
Fri Jan 22 04:34:47 UTC 2016


Hello,

I'd suggest using Locale.ROOT instead of Locale.ENGLISH for this purpose.

Naoto

On 1/21/16 10:57 PM, Claes Redestad wrote:
> Hi,
>
> using String.toLowerCase() in URL allows some strings to lower-case to a
> string that'd be invalid, e.g. "FILE".toLowerCase() -> "f\u0131le" in
> turkish locales.
>
> This patch suggests using the locale-independent
> String.toLowerCase(Locale.ENGLISH) instead, since only a-z and A-Z are
> legal alphabeticals according to spec.
>
> Webrev: http://cr.openjdk.java.net/~redestad/8147962/webrev.01/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8147962
>
> Thanks!
>
> Claes
>


More information about the net-dev mailing list