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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -