Trying to convert string looking like "ÐавлÑк ÐÑкÑоÑ" to correctly looking string


I've got a problem converting string looking like
"ÐавлÑк ÐÑкÑоÑ" to correctly looking
string.



I'm trying to use such way:



func stringToUTF16String (stringaDaConvertire stringa:
String) -> String {

let encodedData =
stringa.dataUsingEncoding(NSUTF16StringEncoding)!
let attributedOptions = [NSDocumentTypeDocumentAttribute:
NSHTMLTextDocumentType]
let attributedString = NSAttributedString(data: encodedData,
options: attributedOptions, documentAttributes: nil, error: nil)!


//println(attributedString.string)
return attributedString.string
}


But I got a compiler error: "Type of expression is ambisious withou
more context" on that row:



 let attributedString = NSAttributedString(data:
encodedData, options: attributedOptions, documentAttributes: nil,
error: nil)!

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow