Minor cleanup
This commit is contained in:
parent
f18f145ead
commit
13c09989b2
1 changed files with 6 additions and 6 deletions
12
README.md
12
README.md
|
@ -1,6 +1,6 @@
|
||||||
[](https://opensource.org/licenses/Apache-2.0)
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
[](https://kotlinlang.org/)
|
[](https://kotlinlang.org/)
|
||||||
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/urlencoder/)
|
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/urlencoder/)
|
||||||
[](https://github.com/ethauvin/urlencoder/releases/latest)
|
[](https://github.com/ethauvin/urlencoder/releases/latest)
|
||||||
[](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/urlencoder)
|
[](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/urlencoder)
|
||||||
|
|
||||||
|
@ -113,13 +113,13 @@ Apart for being quite inefficient, some URL components encoded with `URLEncoder.
|
||||||
For example, a simply search query such as:
|
For example, a simply search query such as:
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
val u = URLEncoder.encode("foo + bar", StandardCharsets.UTF_8)
|
val u = URLEncoder.encode("foo +bar", StandardCharsets.UTF_8)
|
||||||
```
|
```
|
||||||
|
|
||||||
would be encoded as:
|
would be encoded as:
|
||||||
|
|
||||||
```
|
```
|
||||||
foo+%28+bar
|
foo+%2Bbar
|
||||||
```
|
```
|
||||||
|
|
||||||
Trying to decode it with [Spring](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/util/UriUtils.html#decode(java.lang.String,java.lang.String)), for example:
|
Trying to decode it with [Spring](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/util/UriUtils.html#decode(java.lang.String,java.lang.String)), for example:
|
||||||
|
@ -131,10 +131,10 @@ UriUtils.decode(u, StandardCharsets.UTF_8))
|
||||||
would return:
|
would return:
|
||||||
|
|
||||||
```
|
```
|
||||||
foo+++bar
|
foo++bar
|
||||||
```
|
```
|
||||||
|
|
||||||
Unfortunately, decoding with [Uri.decode](https://developer.android.com/reference/android/net/Uri#decode(java.lang.String)) on Android, [decodeURI](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI) in Javascript, etc. would yield the exact same result.
|
Unfortunately, decoding with [Uri.decode](https://developer.android.com/reference/android/net/Uri#decode(java.lang.String)) on Android, [decodeURI](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI) in Javascript, etc. would yield the exact same result.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue