[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 893
  • Last Modified:

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
0
Charlie_Melega
Asked:
Charlie_Melega
  • 2
1 Solution
 
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
 
morpheiosCommented:
Try

Get-Content -Encoding UTF16 fileinput.txt | Out-File -Encoding ASCII fileoutput.txt
0
 
Steve KnightIT ConsultancyCommented:
Sorry had missed the powershell tag and just saw "MSDOS"
Steve
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now