Sorting it all Out Michael Kaplan's random stuff of dubious value Be sure to read the disclaimer here first!
A question I received in email:
In the FRA and ESN OSes, when I type some word on the command prompt with an acute-accented e like génération and redirect it to a file (eg: “echo génération > abcd.txt”) then the file contains a comma instead of the é. (The file has g,n,ration). But when I don’t redirect, I can see the character properly in the command prompt. I am also able to copy-paste to that file with the characters intact. Only the redirection is causing trouble.Can you advise as to why this could happen? I would have thought that it has the wrong code page but the fact that I can see the characters properly on screen seems to preclude that guess. Any help would be very appreciated.
Of course, any time the difference is between a console application and a regular windows application, the first guess as to the problem is one of those OEMCP vs. ACP issues.
So, looking at some code pages (1252 and 437):
On code page 437, 0x82 is U+00E9 (é -- LATIN SMALL LETTER E WITH ACUTE), while On code page 1252, 0x82 is U+201a (‚ -- SINGLE LOW-9 QUOTATION MARK).
So the output was never different at all -- but the way that the underlying byte was being interpretted was....
This post brought to you by "‚" (U+201a, SINGLE LOW-9 QUOTATION MARK)