Always uses UTF16
felixfbecker opened this issue · comments
Felix Becker commented
Most tools use UTF8 (and it's the default in PowerShell 6), but this module always uses [System.Text.Encoding]::Unicode
(UTF16) instead of [System.Text.Encoding]::UTF8
.
So trying something like this:
(kubectl get secret database -o json | ConvertFrom-Json).data.password | ConvertFrom-Base64String
Will print a bunch of random chinese characters instead of the actual value, while this will work correctly:
(kubectl get secret database -o json | ConvertFrom-Json).data.password | base64 --decode
I would propose a -Encoding
parameter.
Peter Schultze commented
Good catch! I'll fix it
Peter Schultze commented
Done