workstation/roles/home-cli/files/utf16diff.ps1

4 lines
187 B
PowerShell
Raw Normal View History

2023-04-17 12:04:07 +00:00
[string]$file = $args[0]
[string]$encoding = $(&"C:\Program Files\Git\usr\bin\file.exe" -b --mime-encoding $file)
&"C:\Program Files\Git\usr\bin\iconv.exe" -c -f $encoding -t UTF-8 $file