4 ms·
mhd doesn't say that: Thus 'ID;P' would be a valid header for SYLK and e.g. for German "CSV"s.
by Someone 10y ago
mhd doesn't say that:
Thus 'ID;P' would be a valid header for SYLK and e.g. for German "CSV"s.
- philh 10y ago"If CSV would stick to commas ... then even such overly simple heuristics would've sufficed, wouldn't it?"
- Someone 10y agoAh, thanks. Apparently, mhd knew and forgot :-) The problem of discriminating between csv and SYLK files is unsolvable, as every file with only ASCII characters and no commas or quotes is a valid csv file (with one column) and there are valid SYLK files in that set.
- ufmace 10y agoIn the general sense, yeah, but you would think it shouldn't be too hard to make a reasonable guess about which one it is and handle failures gracefully instead of assuming that it's SYLK based on a tiny amount of data and then blowing up when it turns out not to be.