Skip to content

Commit 3c5c08b

Browse files
committed
fix(read): encode latin1
1 parent 36b84fd commit 3c5c08b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

project/Morpho/MorphoReader/Read.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ private string ReadEdxFile(string path)
2929
{
3030
string characters = @"[^\s()_<>/,\.A-Za-z0-9=""\P{IsBasicLatin}\p{IsLatin-1Supplement}]+";
3131

32+
var isoLatin1 = Encoding.GetEncoding(28591);
3233
if (!System.IO.File.Exists(path))
3334
throw new Exception($"{path} not found.");
34-
string text = System.IO.File.ReadAllText(path);
35+
string text = System.IO.File.ReadAllText(path, isoLatin1);
3536
string res = Regex.Replace(text, characters, "");
3637

3738
return res.Replace("<Remark for this Source Type>", "");

0 commit comments

Comments
 (0)