powershell - Encode a string in UTF-8 -
I want to encode the string in PowerShell in UTF8.
This is what I have done:
$ consumer_key = "xvz1evFS4wEEPTGEFPHbog" $ enc_consumer_key = System.Text.UTF8 encoding ($ consumer_key) But I get an error:
is not identified as the name of cmdlet in System.Text.UTF8Encoding
Try instead:
$ enc = [system.Text.Encoding] :: UTF8 $ Consumer = "xvz1evFS4wEEPTGEFPHbog" $ encconsumerkey = $ enc.GetBytes ($ consumer)
Comments
Post a Comment