batch command line don't support accent and french characters???

Discussion in 'Windows Server' started by Jéjé, Apr 6, 2005.

  1. Jéjé

    Jéjé Guest


    I have this command line in a batch file
    for %%f in (*.doc) do echo %%f >> list.txt

    this simply fill the list.txt file with all word document in the folder
    the command works fine, but accent characters are miss encoded:

    the list.txt file contain:
    Ceci est un document ,.doc

    instead of
    Ceci est un document é.doc

    the é is changed to , (or other strange character)

    A simple command like this produce the same result:
    dir /b *.doc > list2.txt

    what can I do?


    Jéjé, Apr 6, 2005
    1. Advertisements

  2. Jéjé

    CyberDroog Guest

    It sounds like it has something to do with ASCII vs Unicode fonts. How are
    you viewing the list.txt file? Does it show the same contents when you
    open it in Notepad as it does when you "type list.txt" at the command line?
    CyberDroog, Apr 6, 2005
    1. Advertisements

  3. Jéjé

    Jéjé Guest

    I open it using notepad.

    French characters directly typed in the command line are good.
    echo éàéé > list.txt
    produce a file with the same characters.
    but "dynamic" strings like the file name produce wrong characters.
    Jéjé, Apr 7, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.