From 42893108b5d8924aab5b8fc40cae430ff64edb01 Mon Sep 17 00:00:00 2001 From: Hannah Kim Date: Wed, 12 Apr 2023 21:22:23 -0400 Subject: [PATCH] Fixed numeral localization in insulin delivery table view --- Loop/View Controllers/InsulinDeliveryTableViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Loop/View Controllers/InsulinDeliveryTableViewController.swift b/Loop/View Controllers/InsulinDeliveryTableViewController.swift index 7a3f9115b3..c340f8f536 100644 --- a/Loop/View Controllers/InsulinDeliveryTableViewController.swift +++ b/Loop/View Controllers/InsulinDeliveryTableViewController.swift @@ -609,7 +609,7 @@ fileprivate var numberFormatter: NumberFormatter { fileprivate func createAttributedDescription(from description: String, with font: UIFont) -> NSAttributedString? { let descriptionWithFont = String(format:"%@", description) - guard let attributedDescription = try? NSMutableAttributedString(data: Data(descriptionWithFont.utf8), options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil) else { + guard let attributedDescription = try? NSMutableAttributedString(data: descriptionWithFont.data(using: .utf16)!, options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil) else { return nil }