Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Observe the following snippet:

PS Z:\dev\windows\nc\NC.ProtoBuf> hg help qimport
hg qimport [-e] [-n NOM] [-f] [-g] [-P] [-r REV]... FICHIER...

importe un patch

    Le patch est insÚrÚ dans la sÚrie Ó la suite du dernier patch appliquÚ. Si
    aucun patch n'a encore ÚtÚ appliquÚ, le patch sera ajoutÚ en tÛte de
    sÚrie.

    Le patch portera le mÛme nom que le fichier dont il provient, Ó moins
    qu'un autre nom ne soit spÚcifiÚ Ó l'aide de -n/--name.

    Vous pouvez enregistrer un patch dÚjÓ prÚsent dans le rÚpertoire de patchs
    Ó l'aide de l'option -e/--existing.

As one can see the output is mangled in this French output. For instance, dÚjÓ should be déjà. I utilize both cmd.exe and PowerShell - the result is the same.

Is there any way to configure the Command Prompt to render the French accents properly?

EDIT

Following an advice from http://superuser.com/users/52492/redgrittybrick I have tried PowerShell ISE - still no love:

_____________________________________________________________________________________
PS Z:\> hg help qimport
hg qimport [-e] [-n NOM] [-f] [-g] [-P] [-r REV]... FICHIER...

importe un patch

    Le patch est insÚrÚ dans la sÚrie Ó la suite du dernier patch appliquÚ.
    Si aucun patch n'a encore ÚtÚ appliquÚ, le patch sera ajoutÚ en tÛte de
    sÚrie.

    Le patch portera le mÛme nom que le fichier dont il provient, Ó moins
    qu'un autre nom ne soit spÚcifiÚ Ó l'aide de -n/--name.

    Vous pouvez enregistrer un patch dÚjÓ prÚsent dans le rÚpertoire de
    patchs Ó l'aide de l'option -e/--existing.

    Avec -f/--force, un patch dÚjÓ prÚsent du mÛme nom sera ÚcrasÚ.

EDIT 2

I am pretty sure, that there is no problem with the hg itself, because when I redirect the output of hg help qimport to a file and open the latter in an editor I see this:

hg qimport [-e] [-n NOM] [-f] [-g] [-P] [-r REV]... FICHIER...

importe un patch

    Le patch est inséré dans la série à la suite du dernier patch appliqué.
    Si aucun patch n'a encore été appliqué, le patch sera ajouté en tête de
    série.

    Le patch portera le même nom que le fichier dont il provient, à moins
    qu'un autre nom ne soit spécifié à l'aide de -n/--name.

    Vous pouvez enregistrer un patch déjà présent dans le répertoire de
    patchs à l'aide de l'option -e/--existing.

    Avec -f/--force, un patch déjà présent du même nom sera écrasé.

Which is perfect.

share|improve this question
    
It's not the DOS-prompt. DOS is an operating system. –  user unknown Sep 5 '11 at 15:07
    
It looks like 8859-1 (or CP 1252, no character showed allow to see the difference, but hg code is probably ISO 8859-1) data displayed using a CP 852 font. –  AProgrammer Sep 5 '11 at 16:23
    
@AProgrammer - I have tried both CP 1252 and CP 852 - the same unsatisfactory result. –  mark Sep 6 '11 at 6:07

2 Answers 2

up vote 2 down vote accepted

Try "PowerShell ISE" not "PowerShell" - it understands UTF-8 and other character sets.

enter image description here


Update:

Problem

You are seeing Ú instead of é

Analysis

é is at code point 0xE9 in ISO 8859-1 Latin-1 (and several similar encodings)
Ú is at code point 0xE9 in code page 850

Therefore your application is emitting text using Latin-1 encoding. However your console is set for code page 850.

Solution

Using chcp to change the console encoding will, in conjunction with an appropriately encoded font, most likely solve the problem.


I can reproduce the problem and fix it by changing the command prompt properties to change the font from "Raster" to "Lucida Console". The Raster fonts have what Microsoft refer to as an OEM encoding.

before

after

share|improve this answer
    
I have modified my post - still no love. –  mark Sep 6 '11 at 6:06
    
See modified answer, I know you've tried chcp but the answer must lie there. –  RedGrittyBrick Sep 6 '11 at 10:07
    
Of course, changing the font to Lucida and changing the code page to 1252 does the trick. Thank you very much. –  mark Sep 6 '11 at 10:24
    
+1 for a great answer! –  8088 Sep 6 '11 at 12:06

Try changing the code page with the chcp command. For example:

C:\ chcp 1252

I say 1252 because this guy seemed to have success with it for displaying French characters.

If that works there is still another step because it is reset with every command prompt window. I haven't tested this out but according to this site it will change the code page for all future command prompt windows.

Start->Run->regedit
Go to [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage]
And change the "OEMCP" value to "1252"

chcp command found on ComputerHope.com

share|improve this answer
    
+1 for the info, however, changing to 1252 does not resolve the issue. –  mark Sep 5 '11 at 16:05
    
Maybe you should try some other codes. Someone above suggested using 852. –  Robert Sep 5 '11 at 16:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.