Skip to content

Commit

Permalink
Provided support for Unicode texts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-Kimura committed Feb 17, 2019
1 parent f513cfd commit 21edc4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions SharpClipboard/SharpClipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using System.Runtime.InteropServices;

using WK.Libraries.SharpClipboardNS.Views;
using System.Text;

namespace WK.Libraries.SharpClipboardNS
{
Expand Down
4 changes: 2 additions & 2 deletions SharpClipboard/Views/ClipboardHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ protected override void WndProc(ref Message m)

// Determines whether text has been cut/copied.
else if ((SharpClipboardInstance.ObservableFormats.Texts == true) &&
(dataObj.GetDataPresent(DataFormats.Text)))
(dataObj.GetDataPresent(DataFormats.Text) || dataObj.GetDataPresent(DataFormats.UnicodeText)))
{
string capturedText = dataObj.GetData(DataFormats.Text) as string;
string capturedText = dataObj.GetData(DataFormats.UnicodeText).ToString();
SharpClipboardInstance.ClipboardText = capturedText;

SharpClipboardInstance.Invoke(capturedText, SharpClipboard.ContentTypes.Text,
Expand Down

0 comments on commit 21edc4e

Please sign in to comment.