Skip to content

Commit 7ba1867

Browse files
author
ali.ozgur
committed
Removed RTF generation from ICSharpCode.TextEditor because of non ansi character encoding problems
1 parent 4e2ffe5 commit 7ba1867

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

3rd Party/ICSharpCode.Core/Src/Util/ClipboardWrapper.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public static string GetText()
3131
{
3232
// retry 2 times should be enough for read access
3333
try {
34-
return Clipboard.GetText();
34+
return Clipboard.GetText(TextDataFormat.UnicodeText);
3535
} catch (ExternalException) {
36-
return Clipboard.GetText();
36+
return Clipboard.GetText(TextDataFormat.UnicodeText);
3737
}
3838
}
3939

3rd Party/ICSharpCode.TextEditor/Project/Src/Gui/TextAreaClipboardHandler.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ bool CopyTextToClipboard(string stringToCopy, bool asLine)
8282
lineSelected.WriteByte(1);
8383
dataObject.SetData(LineSelectedType, false, lineSelected);
8484
}
85-
// Default has no highlighting, therefore we don't need RTF output
86-
if (textArea.Document.HighlightingStrategy.Name != "Default") {
87-
dataObject.SetData(DataFormats.Rtf, RtfWriter.GenerateRtf(textArea));
88-
}
85+
// Default has no highlighting, therefore we don't need RTF output
86+
// Ali 27.01.2017 : Comment out since RTF is not generated properly for unicode chars
87+
//if (textArea.Document.HighlightingStrategy.Name != "Default") {
88+
// dataObject.SetData(DataFormats.Rtf, RtfWriter.GenerateRtf(textArea));
89+
//}
8990
OnCopyText(new CopyTextEventArgs(stringToCopy));
9091

9192
// Work around ExternalException bug. (SD2-426)

PragmaSQL/DataViewer/frmDataViewer.cs

+1
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ private void DeleteSelectedRows()
486486
private void CopySelectionToClipboard()
487487
{
488488
DataObject dtObj = grd.GetClipboardContent();
489+
489490
if (dtObj == null)
490491
{
491492
return;

PragmaSQL/Editor/ScriptEditor/frmScriptEditor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4175,7 +4175,7 @@ private void CopySelectedMessagesToClipboard(bool copyWithHeaderInfo)
41754175
sb.AppendLine(selLine);
41764176
}
41774177

4178-
Clipboard.SetText(sb.ToString());
4178+
Clipboard.SetText(sb.ToString(),TextDataFormat.UnicodeText);
41794179
}
41804180

41814181
private void ReclaimWindowNumber()

0 commit comments

Comments
 (0)