We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd58378 commit ad8c395Copy full SHA for ad8c395
1 file changed
Sources/TextFileKit/StringTableRepresentable.swift
@@ -50,12 +50,14 @@ extension StringTableRepresentable {
50
usedLossyConversion: &usedLossyConversion
51
),
52
rawValue != 0,
53
- let rawText = nsString as? String
+ var rawText = nsString as? String
54
else {
55
throw TextFile.ParserError.unrecognizedTextEncoding
56
}
57
let /*encoding*/ _ = String.Encoding(rawValue: rawValue) // TODO: not used
58
59
+ rawText = rawText.replacingOccurrences(of: "\r\n", with: "\n") // TODO: hacky line-ending conversion
60
+
61
self.init(rawText: rawText)
62
63
0 commit comments