Home

Can't copy code containing emoji characters in Linqpad 7

If I attempt to copy text in the editor which contains some emoji characters, I get a System ArgumentException The surrogate pair is invalid. Missing a low surrogate character and if initiated using Ctrl-C then the selected text is deleted and replaced by the letter c. If I copy using the menu, then I get the same error, but the selected text is not deleted.

For example

var c1 = "📆".Dump();
var c2 = char.ConvertFromUtf32(0x1f4c6).Dump();
(c1 == c2).Dump();

There is no problem copying the character from the results window or pasting into the code window.

This is using Linqpad v7.4.9

Comments

Sign In or Register to comment.