>>>> 2010/02/16 16:49 -0500, Thomas Dickey >>>> yes, but iirc, interrupts aren't usable in Windows - only DOS. <<<<<<<< Well, if so, in our hybrid, there are other special function calls.
Winnls.h (include Windows.h) UINT GetOEMCP(void); MuSoft s webpage claims only Windows 2000, no earlier, but the registry value goes again at least to Win95. Maybe muSoft simply trims all older off--although there is mention of an older function, GetKBCodePage (winuser.h). (Abd there is a function GetACP that yields the number associated with, say, Notepad s showing an 8-bit-charactered textfile.) There are also Wincon.h (include Windows.h) UINT WINAPI GetConsoleCP(void); /* keyboard CP */ and UINT WINAPI GetConsoleOutputCP(void); and maybe this last is the best. For someone who really wants to look in the registry, there is this: /* do not define UNICODE */ #include <windows.h> #include <winreg.h> { HKEY hkey; DWORD dwType, dwSize; if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("System\\CurrentControlSet\\Control\\Nls\\Codepage"), 0, 0, &hkey) == ERROR_SUCCESS) { dwType = REG_SZ; dwSize = sizeof(OEMCP); RegQueryValueEx(hkey, TEXT("OEMCP"), NULL, &dwType, (PBYTE) &OEMCP, &dwSize); RegCloseKey(hkey); } } or { DWORD dwType, dwSize; dwType = REG_SZ; dwSize = sizeof(OEMCP); /* For XP SP2, where RegGetValue is not available, use SHRegGetValue in * shlwapi.dll in place of RegGetValue. */ RegGetValue(HKEY_LOCAL_MACHINE, TEXT("System\\CurrentControlSet\\Control\\Nls\\Codepage"), TEXT("OEMCP"), NULL, &dwType, (PBYTE) &OEMCP, &dwSize); } _______________________________________________ Lynx-dev mailing list Lynx-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/lynx-dev