Converting file from UTF-16 to ASCII format

Hello,


I am looking for a command line option that will allow me to convert a file in UTF-16 encoding to ASCII. It appears that the "TYPE" command will only work to convert from files from UTF-8 to ASCII. I know there are tools out there to do this but I need a command line driven option.

Thanks in advance for any assistance on this
Charlie_MelegaAsked:
Who is Participating?
 
morpheiosConnect With a Mentor Commented:
Try

Get-Content -Encoding UTF16 fileinput.txt | Out-File -Encoding ASCII fileoutput.txt
0
 
Steve KnightIT ConsultancyCommented:
Can you provide an example file for us please.

Have you tried a find too perhaps:

find /v "" yourfile.txt > newfile.txt

Steve
0
 
stergiumCommented:
hello.
try this one  (recode)
http://www.gnu.org/software/recode/recode.html
hope that helps
0
 
Steve KnightIT ConsultancyCommented:
Sorry had missed the powershell tag and just saw "MSDOS"
Steve
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.