From owner-freebsd-current@FreeBSD.ORG Thu Nov 4 17:58:40 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D693A16A4CE; Thu, 4 Nov 2004 17:58:40 +0000 (GMT) Received: from nerve.riss-telecom.ru (nerve.riss-telecom.ru [80.66.65.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id E885A43D2D; Thu, 4 Nov 2004 17:58:39 +0000 (GMT) (envelope-from frol@nerve.riss-telecom.ru) Received: from nerve.riss-telecom.ru (localhost [127.0.0.1]) by nerve.riss-telecom.ru (8.13.1/8.13.1) with ESMTP id iA4Hw5B7070171; Thu, 4 Nov 2004 23:58:05 +0600 (NOVT) (envelope-from frol@nerve.riss-telecom.ru) Received: (from frol@localhost) by nerve.riss-telecom.ru (8.13.1/8.13.1/Submit) id iA4Hw5dd070170; Thu, 4 Nov 2004 23:58:05 +0600 (NOVT) (envelope-from frol) Date: Thu, 4 Nov 2004 23:58:05 +0600 From: Dmitry Frolov To: freebsd-current@freebsd.org Message-ID: <20041104175805.GA69815@nerve.riss-telecom.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: RISS-Telecom, JSC X-PGP-Fingerprint: 5232 98E7 596E 21C2 52B5 FCAE 8088 3F87 88BC 27B0 User-Agent: Mutt/1.5.1i cc: tjr@freebsd.org Subject: cut(1) behaviour changed since 5.2.1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2004 17:58:41 -0000 [ Cc'ing tjr@ because he is the comitter of the change in question ] I'm experiencing a minor problem with cut(1) while trying to run shell script (installer), written for FreeBSD 5.2.1, on 5.3-RC1 system. I don't know if it's really a bug, but if it is someone may want look at it. The problem is that on 5.3 cut returns 'Illegal byte sequence' (EILSEQ) error while parsing files without trailing newline, while on 5.2.1 it doesn't. It looks like the behaviour was changed with the revision 1.27 of the cut.c (about handling of multibyte characters). Here is the demonstration: frol@atlas ttyp0:~$uname -spr FreeBSD 5.3-RC1 i386 frol@atlas ttyp0:~$echo aaa:bbb | cut -d : -f 1 aaa frol@atlas ttyp0:~$echo -n aaa:bbb | cut -d : -f 1 cut: stdin: Illegal byte sequence frol@atlas ttyp0:~$echo $? 1 However on 5.2.1 all goes well: frol@sva ttyp0:~$uname -spr FreeBSD 5.2.1-RELEASE-p7 i386 frol@sva ttyp0:~$echo aaa:bbb | cut -d : -f 1 aaa frol@sva ttyp0:~$echo -n aaa:bbb | cut -d : -f 1 aaa frol@sva ttyp0:~$echo $? 0 wbr&w, dmitry. -- Dmitry Frolov RISS-Telecom Network, Novosibirsk, Russia 66415911@ICQ, +7 3832 NO WA1T, DVF-RIPE