[ios] fix encoding for the empty category selection text view

NSUTF8StringEncoding works incorrectly with html data type in the UITextView

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2024-12-23 11:56:44 +04:00 committed by Kiryl Kaveryn
parent 0873f97754
commit 9347453d66

View file

@ -95,7 +95,7 @@ NSString * const kToEditorSegue = @"CategorySelectorToEditorSegue";
subtitleTextView.textContainerInset = UIEdgeInsetsZero;
NSString *subtitleHTML = L(@"editor_category_unsuitable_text");
NSData *htmlData = [subtitleHTML dataUsingEncoding:NSUTF8StringEncoding];
NSData *htmlData = [subtitleHTML dataUsingEncoding:NSUnicodeStringEncoding];
NSDictionary *options = @{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType};
NSError *error = nil;