#Conversion error when the input and output are encoded differently
$str=".d_'+♂¢£"
$in='Unicode'
$to='utf8'
$en=[Convert]::ToBase64String([System.Text.Encoding]::$in.GetBytes($str))
$de=[System.Text.Encoding]::$to.GetString([System.Convert]::FromBase64String($en))
$en;$de
$uri='https://github.com/stadub/PowershellScripts/issues/22'
$r=irm $uri|select-string -Pattern '(?<=gid=")[^"]+' -AllMatches
$r.matches.value
$r.matches.value|%{$_|ConvertFrom-Base64String}
The common encoding in the network is utf8.
Need to use utf8,Or join the conversion option。
The common encoding in the network is utf8.
Need to use utf8,Or join the conversion option。