Skip to content

Commit f3dc84f

Browse files
authored
Merge pull request #1979 from hannkm/dev
Fixed numeral localization in insulin delivery table view
2 parents 7e232b0 + 4289310 commit f3dc84f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Loop/View Controllers/InsulinDeliveryTableViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ fileprivate var numberFormatter: NumberFormatter {
609609
fileprivate func createAttributedDescription(from description: String, with font: UIFont) -> NSAttributedString? {
610610
let descriptionWithFont = String(format:"<style>body{font-family: '-apple-system', '\(font.fontName)'; font-size: \(font.pointSize);}</style>%@", description)
611611

612-
guard let attributedDescription = try? NSMutableAttributedString(data: Data(descriptionWithFont.utf8), options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil) else {
612+
guard let attributedDescription = try? NSMutableAttributedString(data: descriptionWithFont.data(using: .utf16)!, options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil) else {
613613
return nil
614614
}
615615

0 commit comments

Comments
 (0)