mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix -EncodedCommand implementation
PowerShell uses Encoding.Unicode, which is different from Encoding.UTF8.
This commit is contained in:
@@ -146,7 +146,7 @@ OPTIONS
|
||||
break;
|
||||
case Options.EncodedCommand:
|
||||
byte[] data = Convert.FromBase64String(nextArg);
|
||||
initialScript = Encoding.UTF8.GetString(data);
|
||||
initialScript = Encoding.Unicode.GetString(data);
|
||||
++i;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user