Skip to content

Commit

Permalink
Force Unicode encoding when importing Word docs (stevencohn#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencohn authored and weissm committed May 12, 2024
1 parent dc4c5db commit 2b01246
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions OneMore/Helpers/Office/Word.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public string ConvertFileToHtml(object source)
word.Documents.Open(ref source);
var doc = word.ActiveDocument;

doc.WebOptions.Encoding = Microsoft.Office.Core.MsoEncoding.msoEncodingUTF8;

// save as HTML
doc.SaveAs2(ref target, ref format);
doc.Close();
Expand Down

0 comments on commit 2b01246

Please sign in to comment.