Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: UTF-8 text files with Byte Order Mark

by ikegami (Patriarch)
on Feb 13, 2007 at 20:36 UTC ( [id://599772]=note: print w/replies, xml ) Need Help??


in reply to Re^2: UTF-8 text files with Byte Order Mark
in thread UTF-8 text files with Byte Order Mark

a BOM in a utf-8 file *are* valid

"!" in an ASCII file is also valid. But if you place a "!" at the start of your Perl program, it probably will not compile. It is a malformed file, not from a UNICODE perspective, but from your parser's perspective.

I provided two alternatives (removing the BOM and File::BOM) that will work with your broken tools (i.e. tools that add undesirable character to the files you edit). I'd go with them since allowing the BOM is surely a good thing.

Replies are listed 'Best First'.
Re^4: UTF-8 text files with Byte Order Mark
by muba (Priest) on Feb 13, 2007 at 20:43 UTC

    Ouch. I'm afraid I used the wrong tone in my previous reply. You see, I am now removing that BOM myself (as you can read below). I never meant to attack or critisize you. In fact, I much appreciate your input!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://599772]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found