Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15487] Swift URL returns nil when the url contains an internationalized domain name (IDN) #3943

swift-ci opened this issue Nov 16, 2021 · 0 comments


Copy link

Previous ID SR-15487
Radar None
Original Reporter guillaume.blanchet (JIRA User)
Type Bug


Additional Detail from JIRA
Votes 1
Component/s Foundation
Labels Bug
Assignee ygapps (JIRA)
Priority Medium

md5: 33eea496e300c75fdb3c2ed863d28ef1

Issue Description:

I was wondering why this piece of code always exit with 1:

import Foundation
// an idn domain:
let uLabel = "համընդհանուր-ընկալում-թեստ.հայ"
let urlStr = "https://" + uLabel
guard let url = URL(string: urlStr) else { exit(1) }

Since Apple's browser Safari does support well IDN domains, I was surprised their URL library does not... I tried to urlencode the string beforehand, but it is not helping. Please answer this stackoverflow also:

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant