[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texinfo Windows patch: Non-ASCII text output

From: Jason Hood
Subject: Re: Texinfo Windows patch: Non-ASCII text output
Date: Fri, 26 Dec 2014 19:13:24 +1000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 26/12/2014 18:37, Eli Zaretskii wrote:
> The speed is fine on my machines, and cputs does NOT write one
> character at a time, it uses WriteConsole.  Only cprintf writes one
> character at a time.

Not according to the Visual Studio 2010 source, which is presumably
similar to what MSVCRT.DLL would use.  Why else do you think you
needed to convert to UTF-16?  Here's what happens on my Win7 machine:

C:\test>cat cputs.c
#include <windows.h>
#include <stdio.h>
#include <conio.h>

int main( int argc, char* argv[] )
  DWORD written;

  puts( "\xc3\xbf" );
  _cputs( "\xc3\xbf\r\n" );
  WriteConsole( GetStdHandle( STD_OUTPUT_HANDLE ), "\xc3\xbf\r\n", 4,
                &written, NULL );

  return 0;

C:\test>gcc -O2 -Wall cputs.c -s -o cputs.exe

C:\test>chcp 65001
Active code page: 65001



reply via email to

[Prev in Thread] Current Thread [Next in Thread]