Stop using Windows Notepad
blogs.msdn.com
blogs.msdn.com
Doesn't say anthing about BOM.
You shake it off, and it recedes back into the cobwebs, not to be jarred again until the next time something flies by in your RSS feed about a new Microsoft product or feature that is a poorly conceived sugar-coated re-implementation of cron, grep, sed, bash, vim, awk, ssh, unix pipes, or lisp.
Yes, I too was once a full-time Windows user.
Ok, but everything handles the UTF-8 "BOM" just fine.
For small values of "everything". I can't even count the number of bizarre errors I encounter, only to discover that one of the files I'm working on has been corrupted by somebody carelessly using Notepad. Usually it's not obvious what's going on -- the error will be something like "Error parsing file: illegal byte before start of message body", which provides not much help when it's 23:30 and I'm staring at a text editor wondering what the hell byte it's talking about.IMHO a BOM is completely ridiculous to have on a UTF-8 file, because UTF-8 has no ambiguity over endian-ness that a BOM needs to resolve, and it breaks the principle that UTF-8 can serve as ASCII when all the codepoints <0x7F.
Is there any point to using it in UTF-8 besides pain, suffering, and "well UTF-16 and UTF-32 have it"?
The answer, straight from the horse's mouth.
http://www.unicode.org/versions/Unicode5.0.0/ch02.pdf , pg. 36
"Use of a BOM is neither required nor recommended for UTF-8, but may be encountered in contexts where UTF-8 data is converted from other encoding forms that use a BOM or where the BOM is used as a UTF-8 signature."
That's right, the UTF-8 BOM is neither required nor recommended. I rest my case.
I had similar problem with nbsp, until I moved nbsp from second level (shift+space) to third level in XKB configuration in my Gnome/Fedora/Linux.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
This is one of those problems that also won't be fixed to preserve (bug) compatibility.
Emacs and Perl are also fine. What more do you need?
Should be simple.
If one is afraid of Vim, I would not recommend Emacs.
(the reverse of this is kind-of the only situation in which I use vi, which none-the-less I can use...)
Shit happens...
I mean, the degree to which users wind-up wedded to the default applications in a given OS should not be underestimated or chalked-up to "morons"...
1: is on every Windows machine ever
2: just works
I leave it to you, critics, to select something, anything, that is a fundamental tool available on every *nix machine, and just stop using it.
Hint: nobody but a purist is going to stop using `cat` or `cd` because of a minor incompatibility with a small percentage of computers.
I love Linux, I love Unix, but I also love that Windows had and still has Notepad. One of Microsoft's most successful apps in my eyes, that honestly works. Hell, in any case if it didn't have at least one flaw I'd start getting suspicious wondering if M$ really did write it after all.
Seems like this could well just be a classic case of one person says 'This is a game-ending bug!' and the other person saying, 'Wait, what? That 'bug' is in the spec!'
Just Works: No user intervention required whatsoever, could be used by a 2nd grader with no prior knowledge
just works: does it's job with perhaps a bug or two that can be worked around
A long time ago, someone decided that if your file was 100% ASCII and you chose to save it as UTF-8 and you opened the file up again and added some >0x007f character and later saved again that you should not be prompted
The author makes this sound like an unreasonable request, but I don't see the problem. All ASCII text is also UTF-8; if a file is valid ASCII, it should be opened and saved in UTF-8 mode. P.S. Isn't there some tool on UNIX that does this correctly?
Yes, nearly all of them.That insanity must end.
Oh.. And a simple solution to this problem is simply to ban Windows. It also solves a whole lot of other problems and creates an incentive for keeping sane corporate networks (with interoperable applications and so on).
POSIX subsystem, anyone?