Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Explicitly specify encoding when generating string for NSTextView #184

Merged
merged 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 Xwt.Mac/Xwt.Mac/RichTextViewBackend.cs
View
4 Xwt.Mac/Xwt.Mac/RichTextViewBackend.cs
@@ -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 ()
Something went wrong with that request. Please try again.