Re: [OT] Using DIR (CMD) with redirection to a file

new topic     » goto parent     » topic index » view thread      » older message » newer message
znorq2 said...
jimcbrown said...
znorq2 said...

Hi,

Norway uses the same letters as in English alphabet, with the addition to 3 extra letters - ÆØÅ.

When I try to use the DIR (Console, Windows) command with redirection to file output instead of screen, these letters come out garbled. The letters are shown correctly when displayed directly on screen.

This is the parameters I use in the DIR command;

@dir /n /a /ogen /q /tc
GDC-VNAS-A12.res.no.enterdir.com\A12_PRO01\13079\shared\*.* >C:\WINDOWS\Profiles\111951\desktop\Shared_area_changes.txt

Does anyone know how I can keep the letters intact when redirecting the DIR output to a file?

Kenneth / ZNorQ

How are you displaying the file? What makes you think it is garbled? Are you using Notepad or Wordpad to open it?

If you redirect the listing to a file, and then display the contents of that file on the same console using "type C:\WINDOWS\Profiles\111951\desktop\Shared_area_changes.txt", are the results still garbled?

This sounds like a file text encoding issue.

I usually use Notepad, but I tried viewing them in Wordpad too. The letters are replaced with the following characters; ‘›†’�

Interesting enough, I followed your tip and TYPED the content of the file in the console; The chars are now shown properly again.

I agree with you on the text coding issue, but I've no clue how to go about getting it fixed.

Kenneth / ZNorQ

Hmm. My browser can't display those characters. In vi I see

<91><9b><86><92><9d> 

Anyways, my recommendation is to use a different program to view and edit these text files. The only way I know to change the text encoding used to decode these files is Format->Font->Script in Notepad (change from Western to something else) and Format->Font->Script in Wordpad (change from Western to something else).

The issue isn't the file itself, but in the program you use to view it.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu