Using "DOpus.SetClip" to send UTF8 text to the clipboard will be garbl

Run in CLI

'Copy Content
FileName = "D:\Temp\test.pas"

Dim STools, TextBlob

Set STools = DOpus.Create.StringTools

With DOpus.FSUtil.OpenFile(FileName)
	Set TextBlob = .Read()
End With

FileContent = STools.Decode(TextBlob, "UTF-8")
DOpus.output FileContent 'The log window output is normal
DOpus.SetClip FileContent
DOpus.output "========"
DOpus.output DOpus.GetClip("text") ' There is garbled code.

Select "Paste" in the background menu of the file list, the text file will be garbled

Adjusting "clipbord_text_encoding = utf8nobom" is also invalid (5.0 KB)

It seems OK here:

I am using the simplified Chinese version of windos 10 (2004 19041.450). Is it related to the default encoding of the operating system?

I think it is still the problem of dopus.setclip method

Use the clipboard function provided by vbsedit

剪贴板图片 (3)

1 Like

I switched Windows to that and was able to reproduce the problem.

A fix will be in the next beta.

Thanks for the report and the extra details!

1 Like