delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/16/15:34:54

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <F10D23B02E54D011A0AB0020AF9CEFE988F95F@lynx.ceddec.com>
From: "Town, Brad" <btown AT ceddec DOT com>
To: "'cygwin AT sources DOT redhat DOT com'" <cygwin AT sources DOT redhat DOT com>
Subject: CharToOemBuff in fhandler_console.cc
Date: Mon, 16 Oct 2000 15:36:04 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

On my system (Win2K), the call to CharToOemBuff in
fhandler_console::write_normal in the CVS sources is changing graphic
characters such as the solid block ('\333') into other incorrect characters
such as a capital U.

Changing WriteFile to use 'src' rather than 'buf' in that function corrects
the problem.

The short example program below should output four solid blocks, but it
doesn't; instead, it outputs a block, a 'U', a block, and another 'U'.  Is
anyone else seeing this behavior?  What is the reason behind the call to
CharToOemBuff?  Can/should it be removed safely for all systems?  Do I have
something set up incorrectly that is causing the OEM translation to be
wrong?

Brad Town

PS  "uname -s" gives "CYGWIN_NT-5.0 DECATUR 1.1.5(0.29/3/2) 2000-10-16 15:31
i686 unknown".

--- cut here ---
#include <windows.h>
#include <stdio.h>

int main()
{
    DWORD dw;

    ::WriteConsole(::GetStdHandle(STD_OUTPUT_HANDLE), "\333", 1, &dw, 0);
    putchar('\333'); fflush(stdout);
    ::WriteConsole(::GetStdHandle(STD_OUTPUT_HANDLE), "\333", 1, &dw, 0);
    putchar('\333'); fflush(stdout);

    return 0;
}
--- cut here ---

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019