Skip to content

Commit

Permalink
fix(html-accessoryview): issue with representation of utf8 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
SMartorelli committed Sep 30, 2022
1 parent 0f599a1 commit 3b8f1b5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
46 changes: 24 additions & 22 deletions Notification Agent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2444,7 +2444,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Notification Agent Alerts/Info.plist";
Expand All @@ -2453,7 +2453,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.alert;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2473,7 +2473,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Notification Agent Alerts/Info.plist";
Expand All @@ -2482,7 +2482,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.alert;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2502,7 +2502,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Notification Agent Popups/Info.plist";
Expand All @@ -2511,7 +2511,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.popup;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2531,7 +2531,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Notification Agent Popups/Info.plist";
Expand All @@ -2540,7 +2540,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.popup;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2560,7 +2560,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Notification Agent Onboarding/Info.plist";
Expand All @@ -2569,7 +2569,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.onboarding;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2588,7 +2588,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Notification Agent Onboarding/Info.plist";
Expand All @@ -2597,7 +2597,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.onboarding;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2616,7 +2616,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Notification Agent Banners/Info.plist";
Expand All @@ -2625,7 +2625,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.banner;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2645,7 +2645,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Notification Agent Banners/Info.plist";
Expand All @@ -2654,7 +2654,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.banner;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -2699,6 +2699,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 97;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -2718,7 +2719,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -2762,6 +2763,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 97;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -2775,7 +2777,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
Expand All @@ -2793,7 +2795,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
Expand All @@ -2803,7 +2805,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2822,7 +2824,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 96;
CURRENT_PROJECT_VERSION = 97;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
Expand All @@ -2832,7 +2834,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.9.0;
MARKETING_VERSION = 2.9.1;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion Shared/Views/AccessoryViews/HTMLAccessoryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ final class HTMLAccessoryView: AccessoryView {
let newHtml = #"<span style="color:"# + baseTextColorCode.hexString + #"">"# + html + "</span>"
let data = Data(newHtml.utf8)
do {
let attributedString = try NSMutableAttributedString(data: data, options: [.documentType: NSAttributedString.DocumentType.html, .defaultAttributes: defaultAttributes], documentAttributes: nil)
let attributedString = try NSMutableAttributedString(data: data, options: [.documentType: NSAttributedString.DocumentType.html, .defaultAttributes: defaultAttributes, .textEncodingName: "UTF8"], documentAttributes: nil)
self.textView.textStorage?.setAttributedString(attributedString)
} catch {
NALogger.shared.log("Unable to parse the given HTML. No text will be shown. %{public}@", [error.localizedDescription])
Expand Down

0 comments on commit 3b8f1b5

Please sign in to comment.