Date: Sat, 18 Feb 2006 20:29:34 +0000 From: Benjamin A'Lee <lists@benalee.co.uk> To: freebsd-questions@freebsd.org Subject: Re: Removing BOM from UTF-8 Message-ID: <1140294574.8388.8.camel@localhost> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
> correctly. I named the file nobom.sh and put it in the same directory
> as the files I want to convert. I also set the program permission to
> 0755.
>
> typing the p[program name does nothing; I have to precede it with
> 'perl'. Even then, it does not appear to work correctly. In the
> following example, the file is parsed, but not converted.
Sorry; try changing the first line to #!/usr/local/bin/perl
> perl nobom.sh testfile
>
> 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 file.|
00000010
Ben
--
Termisoc Tech Officer: <http://termisoc.org/>
My Homepage: <http://benalee.co.uk/>
"People demand freedom of speech as compensation for the freedom of
thought which they have but seldom use." -- Søren Kierkegaard
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1140294574.8388.8.camel>
