I have a file path:
file://///10.10.10.10/Yev Pri - Ru─▒n G├╢z├╝yle Ortado─Яu.pdf
This is shown as:
file://///10.10.10.10/Ye%20Pri%20-%20Ru%E2%94%80%E2%96%92n%20G%E2%94%9C%E2%95%A2z%E2%94%9C%E2%95%9Dyle%20Ortado%E2%94%80%D0%AFu.pdf
within <a/>
tag of HTML when I inspect it. I want to generate same string at Java. When I encode it with
URLEncoder.encode(path, StandardCharsets.UTF_8.displayName())
file%3A%2F%2F%2F%2F%2F10.10.10.10%2FYev+Pri+-+Ru%E2%94%80%E2%96%92n+G%E2%94%9C%E2%95%A2z%E2%94%9C%E2%95%9Dyle+Ortado%E2%94%80%D0%AFu.pdf
It seems that browser applies encodeURI()
. How can I get the same string with browser?