I have an app that downloads the html of a website the contains characters in hebrew, this is the code:
let newurl = NSURL(string: "http://www.handasaim.co.il")
var error: NSError?
let html = NSString(contentsOfURL: newurl!, encoding: NSASCIIStringEncoding, error: &error)
if (error != nil) {
println("Whoops, something went wrong")
} else {
println(html)
}
My problem is that the hebrew characters show up as gibrish: òøëú ùòåú - éåí ùéùé
How can I download the html and get the correct characters?