Skip to content

Commit

Permalink
Explicitly specify encoding when generating string for NSTextView
Browse files Browse the repository at this point in the history
  • Loading branch information
grendello committed Apr 5, 2013
1 parent a42b40e commit 9f87961
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Xwt.Mac/Xwt.Mac/RichTextViewBackend.cs
Expand Up @@ -215,8 +215,12 @@ public MacRichTextBuffer ()
Indent = true,
IndentChars = "\t"
});
xmlWriter.WriteDocType ("html", "-//W3C//DTD XHTML 1.0", "Strict//EN", null);
xmlWriter.WriteStartElement ("html");
xmlWriter.WriteAttributeString ("style", String.Format ("font-family: {0}; font-size: {1}", FontFamily, FontSize));
xmlWriter.WriteStartElement ("meta");
xmlWriter.WriteAttributeString ("http-equiv", "Content-Type");
xmlWriter.WriteAttributeString ("content", "text/html; charset=utf-8");
}

public NSAttributedString ToAttributedString ()
Expand Down

0 comments on commit 9f87961

Please sign in to comment.