PowerShell-Beautifier icon indicating copy to clipboard operation
PowerShell-Beautifier copied to clipboard

Rewrite file encoding detection for efficiency and UTF-32 support

Open DTW-DanWard opened this issue 8 years ago • 0 comments

The function for determining the file encoding (Get-DTWFileEncoding) - specifically the code if no BOM is present - is not as efficient as it could be. Also, it might also have an subtle bug (if a 3 byte character exists at the beginning of a UTF-16 file). And it doesn't handle UTF-32 files. Update Get-DTWFileEncoding to fixed these issues.

Also, add UTF-32 files to test/FileEncoding tests.

Seriously, though, does anyone actually store their code in UTF-32?

DTW-DanWard avatar Jun 13 '17 23:06 DTW-DanWard