Detect File Encoding (with Powershell)

As described in .net: Detect the encoding of a file this is a real doozy.

I have two powershell functions for this, neither of them perfect in every situation.

And I have a function for outputing and/or highlighting "unexpected" characters in a text file.

And one for (attempting) to convert the encoding.

External references

See also