4 ms·
Byte Order Marks Must Die
- Kelteseth 4y ago> Text shouldn't have anything about its encoding inside of it. That information should we had from somewhere else, so that as Rob Pike pointed out, state is not introduced to the byte stream. Let's all do our part to render byte order marks unneeded and unused. We deal with like external text files from third party software. There we can simply skip most of the encoding detection if we find a BOM. Note: I'm not an expert in this field and only a beginner (5 years) c++ programmer.
- LinuxBender 4y agoWould this also apply to HTML standards, meaning no more doc type as the first line of Strict and Transitional HTML? e.g. <!DOCTYPE> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" http://www.w3.org/TR/html4/strict.dtd">
- bediger4000 4y agoByte order marks are a simple hack that makes the overall situation worse. How does one concatenate two text files? You have to use a special tool to put them together now, or maybe the OS does it, just like adding "alternate streams" or "forks" to a file means that "copy a file" is now an operating system function. Windows seems to carry a lot of this kind of baggage around: carriage-return/linefeed line endings means you don't absolutely have to have a terminal driver, but it means all kinds of pain dealing with them. Magic files like "CON" or "AUX" are convenient in a circumstance or two, but cause overall pain dealing with special cases to prevent security problems. Making a file's name indicate whether it's executable or not is a neat hack, but causes a lot of security problems otherwise, especially if the list of extensions that make a file executable is never really documented. Having a multi-root ("A:", "B:", "C:") filesystem eases the use of floppies, but then becomes a dreadful set of special cases to deal with.