dir output does not create UTF-8 chars (Umlaute) - Converter solution available ?

  • Thread starter Thread starter Carl Minter
  • Start date Start date
C

Carl Minter

When I enter at the command prompt the well known command

dir >filelist.txt

then all filenames are written into the file. But unfortunately all
special chars like e.g. german Umlaute (äöü) are replaced by other special chars.

How do I achieve that the correct chars are written to the output ?

I could imagine two ways:

1.) dir |convert-to-utf8 >filelist.txt

or

2.) dir >filelist.txt
convert-to-utf8.exe filelist.txt

Does someone know such pipe / file converters ?

Carl
 
Carl Minter said:
When I enter at the command prompt the well known command

dir >filelist.txt

then all filenames are written into the file. But unfortunately all
special chars like e.g. german Umlaute (äöü) are replaced by other special chars.

How do I achieve that the correct chars are written to the output ?

I could imagine two ways:

1.) dir |convert-to-utf8 >filelist.txt

or

2.) dir >filelist.txt
convert-to-utf8.exe filelist.txt

Does someone know such pipe / file converters ?

Carl

Start your Command Prompt with the /u switch:

cmd /u
 
Carl Minter said:
When I enter at the command prompt the well known command

dir >filelist.txt

then all filenames are written into the file. But unfortunately all
special chars like e.g. german Umlaute (äöü) are replaced by other special
chars.

How do I achieve that the correct chars are written to the output ?

I could imagine two ways:

1.) dir |convert-to-utf8 >filelist.txt

or

2.) dir >filelist.txt
convert-to-utf8.exe filelist.txt

Does someone know such pipe / file converters ?

Carl

How about outputting as Unicode?
Opening a DOS-like window with CMD.EXE with the /U switch,
/U Causes the output of internal commands to a pipe or file to be
Unicode

-Paul Randall
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top