lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV Changing the code page under W95/NT?


From: afn06760
Subject: LYNX-DEV Changing the code page under W95/NT?
Date: Sat, 4 Apr 1998 20:51:17 GMT

There have been one or two complaints on this conference about
representing European character sets on the lynx console under
Windows 95/NT.  I wrote a simple test program to determine
whether there is any way to change the output code page so as
to resolve this problem, and I discovered that, either the
Win32 functions don't work, or something further needs to be done.

Under Windows 95, the following program fails to change the 
console output code page, even though the .nls file is 
present in /windows/system.  Has anyone tried this under
Windows NT?  Or do you have to sign a licensing agreement
not to use GNU browsers with NT?
============================================================
codepage.c:

#include <windows.h>
#include <stdio.h>

int main (int argc, char **argv)
{
  unsigned cp = GetConsoleOutputCP();
  printf("Console code page: %d\n", cp);
  printf("Console code page %ssucessfully reset. CP: %d\n",
  SetConsoleCP(1252) ? "" : "un",
  GetConsoleOutputCP());
}
===============================================================
Compiling and running the program:

E:\src\bcsock>gcc -o codepage codepage.c

E:\src\bcsock>codepage
Console code page: 437
Console code page unsucessfully reset. CP: 437

E:\src\bcsock>

reply via email to

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