Re: Removing BOM from UTF-8

2006-02-19 Thread Gerard Seibert
J. Erik Heinz wrote: > use a for-loop in your shell: > > # bash > # cd to/your/directory > # for i in *; do > # nobom.sh $i > $i.new > # done > > this will take all your files in your directory and proceed each one it > with nobom.sh, which then will write it to new file. > > Be sure that y

Re: Removing BOM from UTF-8

2006-02-19 Thread J. Erik Heinz
Hi, Gerard Seibert <[EMAIL PROTECTED]> words on 18.02.2006 - 16:57 (-0500 Zulu-Time): > Benjamin A'Lee wrote: > > It shouldn't be writing any new files; it prints the filtered text to > > stdout. > > > > Ben > > OK, then that is the problem. I need it to actually write the file. It

Re: Removing BOM from UTF-8

2006-02-18 Thread Gerard Seibert
Benjamin A'Lee wrote: > It shouldn't be writing any new files; it prints the filtered text to > stdout. > > Ben OK, then that is the problem. I need it to actually write the file. It could either rename the old file and then rewrite it which would be nice, or just over write the old file. Th

Re: Removing BOM from UTF-8

2006-02-18 Thread Andrew Pantyukhin
I use this to add BOM: http://search.cpan.org/~lyokato/UTF8BOM-1.01/lib/UTF8BOM.pm You shouldn't be so fixed on eliminating BOMs, it's quite a nice concept. It causes less trouble than you think. ___ freebsd-questions@freebsd.org mailing list http://list

Re: Removing BOM from UTF-8

2006-02-18 Thread Benjamin A'Lee
On Sat, 2006-02-18 at 16:14 -0500, Gerard Seibert wrote: > As I continue to play with this, it has become apparent that the new > file is not being written, or at least I cannot locate it. Since I do > not know perl, I have no idea where to look for answers. It shouldn't be writing any new files;

Re: Removing BOM from UTF-8

2006-02-18 Thread Gerard Seibert
Gerard Seibert wrote: > enjamin A'Lee wrote: > > > From: > > "Benjamin A'Lee" <[EMAIL PROTECTED]> > > To: > > freebsd-questions@freebsd.org > > Date: > > Today 03:29:34 pm > >   > > > > On Sat, 2006-02-18 at 14:34 -0500, Gerard Seibert wrote: > > > Maybe I am doing something wrong, but it d

Re: Removing BOM from UTF-8

2006-02-18 Thread Gerard Seibert
enjamin A'Lee wrote: > From: > "Benjamin A'Lee" <[EMAIL PROTECTED]> > To: > freebsd-questions@freebsd.org > Date: > Today 03:29:34 pm >   > > 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 n

Re: Removing BOM from UTF-8

2006-02-18 Thread Benjamin A'Lee
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

Re: Removing BOM from UTF-8

2006-02-18 Thread Gerard Seibert
Benjamin A'Lee wrote: > On Sat, 2006-02-18 at 11:28 -0500, Gerard Seibert wrote: > > It has been suggested that a script could be written to eliminate > > the BOM from a file(s). My script writing skills suck. I have been > > unable to locate one using Google, so I was hoping that someone > > migh

Re: Removing BOM from UTF-8

2006-02-18 Thread Benjamin A'Lee
On Sat, 2006-02-18 at 11:28 -0500, Gerard Seibert wrote: > It has been suggested that a script could be written to eliminate the > BOM from a file(s). My script writing skills suck. I have been unable to > locate one using Google, so I was hoping that someone might know where I > could either locat

Removing BOM from UTF-8

2006-02-18 Thread Gerard Seibert
I have a large number of text files created in MS Word and saved in UTF-8 format. Unfortunately, MS Word adds the BOM to each file. I need to remove the BOM. Information regarding BOM and UTF-8 can be found here: http://www.cl.cam.ac.uk/~mgk25/unicode.html http://www.w3.org/International/question