From 41d508c1deef864880db9846b2f5c5d19a39eca6 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 9 Feb 2025 10:00:00 -0800 Subject: [PATCH] Correct string encoding --- Sources/Parser.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Parser.swift b/Sources/Parser.swift index 2c04349..6e8d8b4 100644 --- a/Sources/Parser.swift +++ b/Sources/Parser.swift @@ -102,7 +102,7 @@ func writeFishHistory(to path: String, history: [FishHistoryEntry], backup: Bool /// /// - Returns: List of ``FishHistoryEntry`` entries from history file. func parseFishHistory(from filePath: String) -> [FishHistoryEntry]? { - guard let fileContents = try? String(contentsOfFile: filePath) else { + guard let fileContents = try? String(contentsOfFile: filePath, encoding: String.Encoding.utf8) else { print("Failed to open file.") return nil }