Fix xcopy so output is either unicode (console) or oem (file)

Kirill K. Smirnov lich at math.spbu.ru
Mon Apr 23 07:22:25 CDT 2007


В сообщении от 23 апреля 2007 16:11 вы написали:
> "Kirill K. Smirnov" <lich at math.spbu.ru> wrote:
> >> >> The written strings in 866 and 1251 code pages are only readable
> >> >> when output console code page matches the string encoding.
> >> >
> >> > This is in wine.
> >> > In windows only cp866 is readable regardless of ConsoleOutputCP.
> >>
> >> As I said I tested under Windows (XP) only, and SetConsoleOutputCP
> >> does change the behaviour of WriteConsoleA for me. If it wouldn't
> >> I'd call it a bug.
> >
> > I tested under Windows 2003 and SetConsoleOutputCP does NOT change the
> > behaviour of WriteConsoleA for me.
> > Does Windows play us a trick?
>
> No the difference in observed behaviour was caused by the fact that I ran
> the test under FAR, once I run it under cmd.exe I see what you do.


Ahhh, I understood!!!

You test does not return codepage back to 866. My version of your test does 
it.
Far Manager somehow checks codepage and converts characters accordingly.
I've removed the last convertion back to cp866 and observed the same behaviur 
as you.

Thus, I can proclaim WriteConsoleA buggy.

--
Kirill



More information about the wine-devel mailing list