X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=xlrXezG/pT9XRxBaM3+/yrVsUFhBgBe9cvOKH6F3FvwDUEbBZ9nxr
	ZRxZatz4QtVN3nJu5YYdO2iBCFpLqpWM0DYWT0H7OwGOcLeEQr3yP6UnFnXUgcmG
	oc0661TmIz1CHCywmxFsoVgXdQnRxAwIcqhBEmXERzFJQFoWxQmDwE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=SpcOk53Otmqq3ScUFuJyI8MOAYs=; b=frXIMWMyOY06kJSJXpB/slhg0ybN
	RYr/igMaoZhMQrfpFLkGH79e1ZVKfxUOm0tXsXwX4kKMQQDxpmDcRU6WTOoK4Y1X
	wPXlMqgowSVPNDGrh10rmOwJvAVmEih4OtOFbLpiQrNFwJXQv+RJgtEzQUyiOEr2
	C6kbGlifLi4Rlik=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_40,RDNS_NONE autolearn=no version=3.3.1
Date: Thu, 8 Aug 2013 17:32:50 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Redirecting cat and paste to file gives garbage
Message-ID: <20130808153250.GN16868@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <5203A1A3.30200@cs.utoronto.ca>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <5203A1A3.30200@cs.utoronto.ca>
User-Agent: Mutt/1.5.21 (2010-09-15)

On Aug  8 09:48, Ryan Johnson wrote:
> Hi all,
> 
> (no, that's not a typo in the subject line)
> 
> 64-bit install, bash inside mintty, all latest packages with the
> cygwin1.dll snapshot shown below...
> 
> # <<< --- begin STC --->>>
> $ uname -a
> CYGWIN_NT-6.1 ryan-laptop-v02 1.7.23s(0.268/5/3) 20130729 19:11:42
> x86_64 Cygwin
> 
> $ echo "Reading" > /dev/clipboard
> 
> # hit [shift]+[insert] to paste
> # (hopefully 8 characters is not "too long" to paste into a TTY)
> # then hit ^D to finish
> $ cat > tmp.txt
> 
> $ cat tmp.txt
> Rg
> eRaedaidnign
> g

The only idea I have is this.  The clipboard data is stored as
CF_UNICODETEXT and as the Cygwin-private CYGWIN_NATIVE_CLIPBOARD format.
How's shift-insert implemented in mintty?  If it reads the CF_UNICODETEXT
part and sends it to the pty unchanged, that could explain
this behaviour.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--
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

