Skip to content

Emoji character in domains not recognized correctly (punycode) #231

Open
@redsk

Description

@redsk
val u = "https://i❤.ws/"
url(u).url

leads to

java.net.URISyntaxException: Expected authority at index 7: http://
  java.net.URI$Parser.fail(URI.java:2848)
  java.net.URI$Parser.failExpecting(URI.java:2854)
  java.net.URI$Parser.parseHierarchical(URI.java:3102)
  java.net.URI$Parser.parse(URI.java:3053)
  java.net.URI.<init>(URI.java:588)
  dispatch.RawUri.toUri(uri.scala:23)
  dispatch.RawUri.toString(uri.scala:24)
  dispatch.url$.$anonfun$apply$3(requests.scala:102)
  dispatch.Req.requestBuilder$1(requests.scala:48)
  dispatch.Req.toRequestBuilder(requests.scala:53)
  dispatch.Req.toRequest(requests.scala:61)
  dispatch.UrlVerbs.url(requests.scala:125)
  dispatch.UrlVerbs.url$(requests.scala:125)
  dispatch.Req.url(requests.scala:17)

Its punycode [1] conversion [2] (https://xn--i-7iq.ws/) works as expected.

https://i❤.ws/ points to a domain registrar and is SFW.

"https://i❤.ws/" visualization when not between backticks.

Opening a new issue because I cannot reopen an issue closed by a collaborator.

[1] https://en.wikipedia.org/wiki/Punycode
[2] used converter: https://www.punycoder.com/

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions