I was wondering if there is a recommended \'cross\' Windows and Linux method for the purpose of converting strings from UTF-16LE to UTF-8? or one should use different method
If you have MSYS2 installed then the iconv
package (which is installed by default) lets you use:
iconv -f utf-16le -t utf-8 <input.txt >output.txt
Change encoding to UTF-8 with PowerShell:
powershell -Command "Get-Content PATH\temp.txt -Encoding Unicode | Set-Content -Encoding UTF8 PATH2\temp.txt"