Chris Jacobs schreef: > > guidelines for the situation where two files are joined, and the > > second one has a BOM, but the first one hasn't. Should the resulting > > file have a BOM? > > In that case you should seriously consider the possibility that the byte > order for both files is different!
Good question. I think the safest way is to allow the concatenation routine to assume that a file without BOM has the native byte order for its platform. But of course, other scenarios can be thought up for different circumstances. - If no BOM, make no assumptions whatsoever and copy the file byte by byte. - If one of the files has a BOM, assume all files have the same byte order as that one. - Or indeed, check out the contents. Pim Blokland