How to Convert Text File to UTF-8 on Windows Command Prompt

command lineutf-8windows

I need to convert a text file to UTF-8 format via Windows command prompt. This needs to be done on another machine and I do not have rights to install software on that machine. I need something like:

c:\notepad   source-file target-file --encoding option

Is there a Windows command prompt utility which can do it?

Best Answer

I need to convert a text file to utf-8 format via windows command prompt

You can easily do this with PowerShell:

Get-Content .\test.txt | Set-Content -Encoding utf8 test-utf8.txt

Further Reading