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)!

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

HD Wallpapers
3D
3D Abstract
City
Celebrities
Indian Celebrities
Cars
Travel
Girls
Animals Birds
Movies
Sports
Black White
Nature
Planes
Anime
Food Drink
Dreamy Fantasy
Architecture
Games
Space
Holidays
Flowers
Love
Artistic
Baby
Beach
Bikes Motorcycles
Macro
Computers
Vector
Funny
Army
Textures
Brands
Misc
Music
Other
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .