I have the following string...
NSString *googleSearchString = @\"http://www.google.com/search?q=lyrics+%22Tænder+På+Dig%22+%22Jakob+Sveistrup%22\";
>
Using Swift 2.2
For escaping non-english characters, for example: to make an URL request do:
let urlPath = path.URLString.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet())
Here urlPath
is an Optional
and path
is your original url (the one with non-english characters)