Sorting it all Out Michael Kaplan's random stuff of dubious value Be sure to read the disclaimer here first!
NOTEPAD adds a BOM (Byte Order Mark) when you save a file in the UTF-8 encoding.
Always1.
You'd think that since Windows Notepad has been doing this for over 319680000 seconds2, and that the combined usage of Windows 20003, Windows XP, Windows Server 2003, Windows XP 64-bit, Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 is so high that it may well blow your mind to calculate the number, that people would have gotten over this by now.
But no.
As recently as yesterday4, people were making comments again in that Why are UTF-8 encoded Unix shell scripts *ever* written or edited in Notepad? blog, the one where I officially suggested that these people who don't like the Notepad behavior of inserting a BOM in front of UTF-8 files had a simple remedy:
STOP USING WINDOWS NOTEPAD!
Yet for some reason people are still arguing it.
Please give up, it is over. If you were in a contest or duel for this5, then you have lost the contest, been bested in the duel. The game is over6.
A long time ago, someone decided that:
you should not be prompted8 in a way like this:
and so that was the way the feature was coded.
Game over.
There is probably an alt.i.hate.microsoft newsgroup somewhere on USENET that would be happy to hear your complaint on the matter.
But the world has moved on.
And Notepad (the apparent premiere tool of UNIX shell script authors throughout the world) has let down a segment of customers who could have updated whatever is reading the scripts in less than a day, rather than complaining about this on and off for the last ~37009 plus days.
Your sacrifice is appreciated.
But please, go home now.
P.S. Isn't there some tool on UNIX that does this correctly10?
P.P.S. I will not include a screenshot of my private Notepad; I'm not trying to tease you here that badly....
1 - Well, not on the private Notepad I build from time to time from the Windows source, but that one is not one that is released to the public.2 - Over ten years, give or take3 - Where this first started happening.4 - The day before today.5 - Which none of you were, who are you kidding?6 - Even more over than the Canadians in that game last night.7 - Which ironically, most UNIX shell scripts are.8 - This is a cool feature too, by the way.9 - Over ten years, give or take.10 - By your definition of "correctness", at least - a BOM-less UTF-8 save.
(Excuse the Shaggy reference!) It wasn't me. Well, this time it wasn't me. I mean, yes, it was me in