delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/21/10:58:23

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,MAY_BE_FORGED,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4D876770.2090006@xs4all.nl>
Date: Mon, 21 Mar 2011 15:57:52 +0100
From: Erwin Waterlander <waterlan AT xs4all DOT nl>
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygwin + GetConsoleOutputCP
References: <4D8651F2 DOT 3000200 AT cwilson DOT fastmail DOT fm> <AANLkTi=2pKTTo0+nUFa9Qaad7FxJwhhbQ5wJqtqtCpaw AT mail DOT gmail DOT com> <20110321111746 DOT GP31220 AT calimero DOT vinschen DOT de> <AANLkTimBFu3=4UCkKL=jraDLX00-MwhYpujm-vsRYsuc AT mail DOT gmail DOT com> <4D8756ED DOT 7010800 AT xs4all DOT nl> <4D8764BD DOT 4060108 AT cwilson DOT fastmail DOT fm>
In-Reply-To: <4D8764BD.4060108@cwilson.fastmail.fm>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019