4 points · by djha-skin · 4y ago · 3 comments
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.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" http://www.w3.org/TR/html4/strict.dtd">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.