Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-12-10 03:45:12 +0300
committerChristopher Faylor <me@cgf.cx>2000-12-10 03:45:12 +0300
commitee1d77e4b71f7166d4d8ada84a062bfc73da90e6 (patch)
treebbe5746e05f5ceb77e4072468ca9a74ef22ff243 /winsup/cygwin/fhandler_clipboard.cc
parent307cb8ba8270a2eaf5bc1331006e0bd67df920ed (diff)
* autoload.cc: Autoload CharToOemA.
* dcrt0.cc (dll_crt0_1): Translate command line to OEM if current codepage is OEM. * environ.cc: Add new option 'codepage' to CYGWIN environment variable. * fhandler_clipboard.cc (fhandler_clipboard::read): Read clipboard in OEM mode if current codepage is OEM. * fhandler_console.cc (fhandler_console::read): Only translate console input if current codepage is ANSI. * fhandler_console.cc (fhandler_console::write_normal): Translate output data if current codepage is ANSI. * pinfo.cc (codepage_init): New function. Setup current codepage from CYGWIN environment variable and set codepage for file APIs. * security.cc (read_sd): Translate file name to it if current codepage is OEM. * winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for translations between multibyte and widechar string and vice versa.
Diffstat (limited to 'winsup/cygwin/fhandler_clipboard.cc')
-rw-r--r--winsup/cygwin/fhandler_clipboard.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc
index 9c7ba9565..7b6d05362 100644
--- a/winsup/cygwin/fhandler_clipboard.cc
+++ b/winsup/cygwin/fhandler_clipboard.cc
@@ -52,7 +52,7 @@ fhandler_dev_clipboard::read (void *ptr, size_t len)
if (!clipboard_eof)
{
OpenClipboard(0);
- hglb = GetClipboardData(CF_TEXT);
+ hglb = GetClipboardData((current_codepage==ansi_cp ? CF_TEXT : CF_OEMTEXT));
lpstr = (LPSTR) GlobalLock(hglb);
if (len < sizeof (lpstr))
{