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

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -