Devskiller/jfairy

url() renerate illegal chars

VatslauX opened this issue · 2 comments

public static String randomUrl(Boolean isHttps) {
NetworkProducer net = Fairy.create().networkProducer();
return net.url(isHttps);
}

Result
https://������������.com
intellij idea 2018-08-10 10 11 36

Those unicode characters aren't illegal in a domain name, are they? Firefox at least (what I'm using, haven't tested others) translates that properly to https://xn--zn7caaaaaaaaaaa.com/ for me.

Some reference info: https://en.wikipedia.org/wiki/Internationalized_domain_name

Well in general You right.
But probably it will be nice to have 2 methods - one for Unicode, second - real addresses for humans
not this)
image