Chinese characters copied to clipboard via VSCode test runner are corrupted #2616
Replies: 1 comment
-
Hi @Fierygit , It seems you are having an issue while using the Go extension, so in this case, I suggest you to report the issue directly in the Go extension's repo. This discussion repo is for extension development only, for now. Hope this helps |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When running a Go test in VSCode using the **"Run Test"** button, Chinese characters copied to the clipboard are corrupted. However, when running the same test via the terminal using go test, the clipboard content is correct.
Steps to Reproduce
Code Example:
func TestClipboard(t *testing.T) {
if err := clipboard.WriteAll("中文"); err != nil {
t.Fatal(err)
}
}
Run in VSCode:
Open the Go file containing the above code.
Click the **"Run Test"** button from the GO Extension to execute the test.
Run in Terminal:
go test -v -run TestClipboard
Expected Result
Regardless of whether the test is run in VSCode or the terminal, the clipboard content should be: 中文
Actual Result
Run in VSCode:
Clipboard content is: 中文
Run in Terminal:
Clipboard content is correct: 中文
Beta Was this translation helpful? Give feedback.
All reactions