Question

when i select and copy this glyph from email message: £ (0x00a3)

and then run:

message=Clipboard.GetText();
if(message==""){
    Console.WriteLine("There is nothing on your clipboard.");

            Environment.Exit(0);
        }
    else{ Console.WriteLine(message); }

reports: "nothing on clipboard"

seems that all glyphs between 00a1-00ff exhibit same behavior.

I've looked at overloads for Clipboard.GetText ... to no avail.

No correct solution

OTHER TIPS

Try with

   message=Clipboard.GetText(TextDataFormat.UnicodeText);

The TextDataFormat.UnicodeText specifies the standard Windows Unicode text format.
However also with a simple GetText I am not experiencing the missing char

Clipboard.SetText("£");
string s = Clipboard.GetText();
Console.WriteLine(s);

I get back the £ char. (By the way it is 0x00A3)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top