X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 	tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <loom.20100106T220554-749@post.gmane.org>
References: <4B421BD3.4040005@gmx.net> 	 <loom.20100106T220554-749@post.gmane.org>
Date: Thu, 7 Jan 2010 08:58:41 +0000
Message-ID: <416096c61001070058w49625871nf63513afb89bf393@mail.gmail.com>
Subject: Re: Cygwin 1.7.1-1: problem with pipe to windows programs
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

2010/1/6 RH:
> echo "select * from mytable" | unix2dos | sqlcmd -S server -U sa -P mypas=
sword
> -d myDatabase
>
> As you can see I'm trying to force the data hitting sqlcmd to be in dos m=
ode but
> somehow I suspect it is getting put into linux-mode line endings before h=
itting
> sqlcmd. =C2=A0The error response is "Error: Internal error at ReadTextLin=
e (Reason:
> Not Specified)"
>
> This command from an NT command shell works:
>
> echo "select * from mytable" | sqlcmd -S server -U sa -P mypassword -d my=
Database
>
> My mount in /etc/fstab is text, I tried binary, that seems to not help.
>
> any ideas?

Another thing to try might be the locale setting. Windows uses
codepage numbers where Unix uses charset names, so perhaps sqlcmd is
stumbling over those. In particular, try unsetting LANG.

Andy

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

