i've a some text from json file, in this text i've applied utf8 encode but this encoder don't recognize a non standard character àèìòù and it's capital char, there is a method to purify ma string ? here my func
func stringToUTF8String (stringaDaConvertire stringa: String) -> String {
let encodedData = stringa.dataUsingEncoding(NSUTF8StringEncoding)!
let attributedOptions = [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType]
let attributedString = NSAttributedString(data: encodedData, options: attributedOptions, documentAttributes: nil, error: nil)!
//println(attributedString.string)
return attributedString.string
}
thank's