oem/ansi codepage support

Egor Duda deo@logos-m.ru
Wed Nov 29 06:48:00 GMT 2000


Hi!

  this    patch    allows    to   specify   CYGWIN=codepage:oem   or
CYGWIN=codepage:ansi  and  force  cygwin  to use appropriate codepage.
Default codepage is ansi, as it is currently.
There's  one  caveat  in  this  patch:  cygwin  performs  switching to
specified   codepage  after  initializing  the  environment,  so  all
initializations   performed   before  environ_init()  will  use  ansi
codepage.   as  far  as  i can see, there's no codepage-dependant code
in those initializations now, but they may appear in the future.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
oem-cp-support.ChangeLog
oem-cp-support.diff

-------------- next part --------------
2000-11-23  Egor Duda <deo@logos-m.ru>

	* autoload.cc: Autoload CharToOemA.
	* dcrt0.cc (dll_crt0_1): If current codepage is OEM, translate
	command line to it.
	* environ.cc: Add new option 'codepage' to CYGWIN environment
	variable.
	* fhandler_clipboard.cc (fhandler_clipboard::read): If current
	codepage is OEM, read clipboard in OEM mode.
	* fhandler_console.cc (fhandler_console::read): Only thanslate
	console input if current codepage is ANSI.
	* fhandler_console.cc (fhandler_console::write_normal): If current
	codepage is ANSI, translate output data.
	* pinfo.cc (codepage_init): New function. Setup current codepage
	from CYGWIN environment variable and set codepage for file APIs.
	* security.cc (read_sd): If current codepage is OEM, translate file
	name to it.
	* winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for
	translations between multibyte and widechar string and vice versa.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oem-cp-support.diff
Type: text/x-c
Size: 7887 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20001129/d2705dab/attachment.bin>


More information about the Cygwin-patches mailing list