beerman has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a UTF8 file and I'm getting the UTF8 BOM which I don't want. Strange thing is that the BOM is in ISO-8859 representation. In other words it shows up as . The Unicode data being written to the file is UTF8 and as we know, you don't need a BOM with UTF8. So the question is how can I get Perl to not write the BOM. Here is a section of my program that I think is relevant to this question
use utf8; ... ... open (OUT,">:utf8", "$name") or die "cannot open file for writing"; ... print OUT $_;
My environment is Windows XP, cygwin and perl 5.10.1. Any help in printing a UTF8 file with no BOM, is much appreciated!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Don't want BOM in output file
by Eliya (Vicar) on Oct 14, 2011 at 17:05 UTC | |
|
Re: Don't want BOM in output file
by zentara (Cardinal) on Oct 14, 2011 at 18:06 UTC | |
|
Re: Don't want BOM in output file
by anneli (Pilgrim) on Oct 15, 2011 at 09:34 UTC | |
by beerman (Novice) on Oct 17, 2011 at 15:29 UTC | |
by anneli (Pilgrim) on Oct 17, 2011 at 22:22 UTC | |
|
Re: Don't want BOM in output file
by Anonymous Monk on Oct 14, 2011 at 18:53 UTC | |
by Eliya (Vicar) on Oct 14, 2011 at 19:27 UTC |