NSURL is missing IDN support
||Date Originated:||10-Jan-2017 05:05 PM|
NSURL and NSURLComponents don’t support internationalized domains. WebKit already supports them, and from what I’ve been able to find it uses libicucore, which is available to developers, but some headers are stripped for some reason.
Steps to Reproduce:
Run this code
var components = URLComponents()
components.scheme = "http"
components.host = "❤️❤️❤️.ws"
It should print http://xn--qeiaa.ws/ twice
The first one prints nil as it fails to create the NSURL.
The NSURLComponents one uses percent-escaping for the host, which seems to work in WebKit, but loads a different site when used with NSURLSession
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!