This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin + GetConsoleOutputCP


On 03/21/2011 03:46 PM, Charles Wilson wrote:
Hmm.  So we have a choice for the cygwin version, for choosing the
default dos cp when the user specifies -iso and doesn't explicitly
specify the cp: either
  1) follow the unix behavior: just simply default to -437.
  2) follow the dos behavior: use GetConsoleOutputCP() as currently
     coded.
  3) Do something completely different, and use GetACP().
  4) Do something completely different, and use nl_langinfo or setlocale.

I think #3 is a bad idea, since it creates a new semantic just /because/.

#4 would make sense if we were designing from scratch -- but then, we'd
really just be re-implementing iconv(1).  I don't think that's a
valuable exercise, and besides:

There is no intention to add other conversions. And I don't plan to
remove the options in the near future.
I think I lean towards #1 for this specific corner case.  In general,
cygwin ports should act like their unix conterparts, even if there is a
"native" win32 port with different semantics, IMO.

Hi,

I agree with you. Same as Linux is better on Cygwin.

SunOS dos2unix determined the code page on non-i386 systems via the keyboard type (See http://manpages.unixforum.co.uk/man-pages/unix/solaris-10-11_06/1/dos2unix-man-page.html). I didn't want to implement that and defaulted to cp437, which is also default on i386 SunOS.

Erwin

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]