Writing a hexagonal shielded char in Powershell

Is there a way to write something like this in Powershell? (Linux will be with Perl)

char foo = '\x41';

I need to enter some non-printable characters in one of my programs

+4
source share
1 answer

You can do an int listing before char .

With decimal number:

 $foo = (65 -as [char])

And from hexa:

 $foo = (0x41 -as [char])

Both will pass you $fooinA

+4
source

Source: https://habr.com/ru/post/1547550/


All Articles