From owner-freebsd-questions@FreeBSD.ORG Sat Feb 18 20:29:39 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F37CE16A420 for ; Sat, 18 Feb 2006 20:29:38 +0000 (GMT) (envelope-from lists@benalee.co.uk) Received: from ariadne.benalee.co.uk (82-45-24-36.cable.ubr13.newt.blueyonder.co.uk [82.45.24.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id B046743D49 for ; Sat, 18 Feb 2006 20:29:36 +0000 (GMT) (envelope-from lists@benalee.co.uk) Received: by ariadne.benalee.co.uk (Postfix, from userid 1000) id 3097646A14A; Sat, 18 Feb 2006 20:29:35 +0000 (GMT) From: Benjamin A'Lee To: freebsd-questions@freebsd.org In-Reply-To: <200602181435.07066.gerard@seibercom.net> References: <20060218111849.15E6.GERARD@seibercom.net> <1140283470.17023.7.camel@ariadne.benalee.co.uk> <200602181435.07066.gerard@seibercom.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 18 Feb 2006 20:29:34 +0000 Message-Id: <1140294574.8388.8.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.5.91 Subject: Re: Removing BOM from UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2006 20:29:39 -0000 On Sat, 2006-02-18 at 14:34 -0500, Gerard Seibert wrote: > Maybe I am doing something wrong, but it does not appear to be working=20 > correctly. I named the file nobom.sh and put it in the same directory=20 > as the files I want to convert. I also set the program permission to=20 > 0755. >=20 > typing the p[program name does nothing; I have to precede it with=20 > 'perl'. Even then, it does not appear to work correctly. In the=20 > following example, the file is parsed, but not converted. Sorry; try changing the first line to #!/usr/local/bin/perl > perl nobom.sh testfile >=20 > Am I doing something incorrectly here? Try: cat testfile | nobom.sh Though the way you describe appears to work here: $ cat bom-testfile | hd 00000000 ef bb bf 23 20 42 4f 4d 20 74 65 73 74 20 66 69 |...# BOM test = fi| 00000010 6c 65 0a |le.| 00000013 $ bomkill.pl bom-testfile | hd 00000000 23 20 42 4f 4d 20 74 65 73 74 20 66 69 6c 65 0a |# BOM test fil= e.| 00000010 Ben --=20 Termisoc Tech Officer: My Homepage: "People demand freedom of speech as compensation for the freedom of thought which they have but seldom use." -- S=C3=B8ren Kierkegaard=20