NSAttributedString initWithHTML niepoprawne kodowanie znaków?

-[NSMutableAttributedString initWithHTML:documentAttributes:] zdaje się mieszać znaki specjalne:

NSString *html = @"“Hello” World"; // notice the smart quotes
NSData *htmlData = [html dataUsingEncoding:NSUTF8StringEncoding];
NSMutableAttributedString *as = [[NSMutableAttributedString alloc] initWithHTML:htmlData documentAttributes:nil];
NSLog(@"%@", as);

To drukuje“Hello†World po którym następuje kilka komend RTF. W mojej aplikacji konwertuję przypisany ciąg na RTF i wyświetlaję go wNSTextView, ale postacie też są tam uszkodzone.

Zgodnie z dokumentacją domyślnym kodowaniem jest UTF-8, ale próbowałem być jawny, a wynik jest taki sam:

NSDictionary *attributes = @{NSCharacterEncodingDocumentAttribute: [NSNumber numberWithInt:NSUTF8StringEncoding]};
NSMutableAttributedString *as = [[NSMutableAttributedString alloc] initWithHTML:htmlData documentAttributes:&attributes];

questionAnswers(2)

yourAnswerToTheQuestion