I am wondering how to enumerate and print all members of EACH installed character set in Windows?
Here is the code I have so far which - pulls out each Encoding and then tries to print chars from 0..200. I could not figure out how to enumerate its members. Here is my code so far.
([Text.Encoding]::GetEncodings()) |% `
{
write-host $_.DisplayName -ForegroundColor Red -BackgroundColor Yellow
$t=[Text.Encoding]::GetEncoding($_.name)
[string]$1=[string]::Empty
90..200 |% `
{
try
{
$1+=(' '+$($t.getChars($_)))
}
catch
{
$1+="[$_]"
}
}
$1 -replace '.{220}', "`$&`n"
}
There must be a better way?!?