Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: command redirect using locales  (Read 3298 times)

0 Members and 1 Guest are viewing this topic.

viking

    Topic Starter


    Adviser
  • miaow-miaow 2.0 for networks
  • Thanked: 1
    command redirect using locales
    « on: December 02, 2004, 05:39:33 AM »
    Hi.
    I have some computers with Windows 2000 in french. I want to redirect some commands output and the problem is that special characters such as é, É, à, À and others do not appear, they are replaced by characters such , ... and others.

    Example:
    If I run in cmd the next command:
    dir /?
    the output in the cmd is correct, it uses those special characters.

    If I run in cmd the command:
    dir /? >>output.txt
    in the file output.txt, all the special characters such as é, É, À, à and others do not appear. They are replaced with something else.

    What do I have to do to obtain a good output redirection?


    Raptor

    • Guest
    Re: command redirect using locales
    « Reply #2 on: December 03, 2004, 07:51:09 AM »
    Have you set your keyboard to the English language?

    viking

      Topic Starter


      Adviser
    • miaow-miaow 2.0 for networks
    • Thanked: 1
      Re: command redirect using locales
      « Reply #3 on: December 06, 2004, 04:56:49 AM »
      merlin_2, I use Windows 2000. Not Unix/Linux. It's a small problem with the locales special characters (for example if the language is french, I don't receive é, à). If I redirect any of commands, if the command should output an é, à and others, I don't receive the right output in a file, these characters are missing; at standard output (command prompt window, from where I launched the command) it`s ok.

      Raptor, what difference is between the output of a command while using english language for the keyboard or other language? I say "none". (Does it matter if I have the keyboard set to use "french" and I give the command "dir c:"? It is any difference from the command "dir c:" using english language for the keyboard?).

      Raptor

      • Guest
      Re: command redirect using locales
      « Reply #4 on: December 06, 2004, 06:03:01 AM »
      If I set my keyboard to my native language, I can not create certain marks.

      viking

        Topic Starter


        Adviser
      • miaow-miaow 2.0 for networks
      • Thanked: 1
        Re: command redirect using locales
        « Reply #5 on: December 06, 2004, 07:27:53 AM »
        Ok, but my problem still stands. It shows those characters in command prompt, but it replaces in the files...

        merlin_2

        • Guest
        Re: command redirect using locales
        « Reply #6 on: December 06, 2004, 01:20:06 PM »
        http://www.computerhope.com/issues/ch000547.htm  its as raptor has suggested..if the keyboard is selected to french whatever key is hit the same would be on screen..have you  changed the keyboard to the french language..?mon ami
        « Last Edit: December 06, 2004, 01:20:54 PM by merlin_2 »

        viking

          Topic Starter


          Adviser
        • miaow-miaow 2.0 for networks
        • Thanked: 1
          Re: command redirect using locales
          « Reply #7 on: December 07, 2004, 05:02:05 AM »
          Ufff.... That is not the problem. I have installed English and French languages for keyboard. The operating system (Windows 2000) is in French. I can write those special characters if I want to, but I can not "output" them using command redirection.

          Suppose I have the éÉàÀ directory, in C:. If I use in commmand prompt the command dir c:, I obtain the directory éÉàÀ in the output.
          If I use dir c: > output.txt, in the output txt I obtain ‚?…• instead of éÉàÀ.


          Wait a minute! The problem has changed: type output.txt gives me a good result. Also, if I open output.txt with: edit output.txt it also shows me good characters.
          Maybe... different character maps for command prompt and windows GUI? I have to check...
          « Last Edit: December 07, 2004, 05:02:38 AM by viking »