Skip to content

Commit 05df606

Browse files
author
ArthurHub
committed
fix unicode clipboard for CLR 4.0
1 parent d094c79 commit 05df606

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/HtmlRenderer/Utils/ClipboardHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static DataObject CreateDataObject(string html, string plainText)
9292
var htmlFragment = GetHtmlDataString(html);
9393

9494
// re-encode the string so it will work correctly
95-
if (html.Length != Encoding.UTF8.GetByteCount(html))
95+
if (Environment.Version.Major < 4 && html.Length != Encoding.UTF8.GetByteCount(html))
9696
htmlFragment = Encoding.Default.GetString(Encoding.UTF8.GetBytes(htmlFragment));
9797

9898
var dataObject = new DataObject();

0 commit comments

Comments
 (0)