5 ms·
I agree that you should use care when using file. My app relied on "file" to identify file types, and in some cases it mis-identified some Microsoft Office file
by jakobegger 7y ago
I agree that you should use care when using file. My app relied on "file" to identify file types, and in some cases it mis-identified some Microsoft Office files. The problem was that Apple ships a very old magic file with macOS, and when I reported the bug they said they don't care.
- gdfasfklshg4 7y agoNot sure why people think they can rely on the pre-installed Unix utilities on macOS. EDIT: Apple routinely don't update the Unix utilities for a decade...
- EliRivers 7y agoYeah, those idiots! They buy something from Apple, and then find it doesn't work. What did they expect. This, of course, is passive-aggressive snark. Suffice to say that I disagree with you; why shouldn't people expect software they buy from Apple to work? People buy from Apple because they don't want to have to deal with all this sort of crap; they just want it to work.
- giancarlostoro 7y agoI am more surprised Apple doesnt invest in their own Unix utils packages honestly. Its not like they dont have the money to do so.
- wtracy 7y agoSteve Jobs originally wanted to strip out the shell entirely and only support POSIX at the level of the C API. To this day, Apple acts like they've been strong-armed into providing support for the Unix utilities. I can understand the attitude that 99% of their userbase will never touch the command line, but that last 1% represents the developers that keep the whole ecosystem going.
- deleted 7y ago[deleted]
- gdfasfklshg4 7y agoWe actually broadly agree that it is a shame that Apple don't support their Unix utilities.
- DonHopkins 7y agoExcel mis-identifies CSV files whose first column is named "ID" as SYLK files. But who would EVER think of naming the first column of a spreadsheet "ID"? https://www.optibrium.com/community/forums/6-general-how-do-i/21-unable-to-open-csv-files-in-excel https://www.optibrium.com/community/forums/6-general-how-do-... >Q: I have saved the result table from admensa into .csv format. However I am not able to open in excel. It is said that SYLK: file format is not valid. Do you have any experience on it? Thanks. >A: This is an Excel 'feature.' I would guess that the first column of your data is entitled "ID". For some reason, Excel interprets any CSV file beginning with "ID" as an SYLK format file (not really sure what that is!). If you edit the file in, say, Notepad and change the name of the first column in the header row, you should find that it will load without a problem. >This will happen if you save a CSV file from any application with the first characters "ID". So, unfortunately, there's not much we can do about it, other than to recommend that users don't call their first column "ID"!
- dfox 7y agoExcel actually mostly ignores the extension and relies on heuristics to detect the file type on load. Many web applications used to implement "XLS export" by writing out CSV file with .xls extension. This magic detection of file type has one unfortunate side effect: it is not exactly obvious how to convince Excel to load plain text data that is not CSV with delimiters from the current locale. (which is major PITA with most European locales where Excel uses "Semicolon"-SV and not "Comma"-SV but still calls it CSV)
- wmoser 7y agoYou’ll have to excuse me because I’m not in front of a windows computer right now, but if you open excel first, there is a data tab on the ribbon and an import data wizard or something like that and you can tell it what the delimiter is. You can also apply types to columns and whatnot before importing. Not the quickest but does help extract the data.
- Symbiote 7y agoThis is a fairly new feature in Excel. The lack of this feature pushed a lot of scientists to OpenOffice/LibreOffice Calc. At first, just to open the file and "Save as Excel", but of course, then they start using Calc. (At least that's my experience writing scientific software in Europe. Excel localized not just display, but the input and output. With Calc you could just open a file as "pipe separated UTF-8" and be done with it.)
- cannam 7y ago> Apple ships a very old magic file with macOS I particularly relish the way it identifies macOS disk image files as VAX executables. I hope they never change that.
- andreareina 7y agoOh yeah, I got bitten by that. Turns out that MS Office files are zip-compressed xml files. Well I didn't know that, and the files were named something like data.csv, so that left me confused until a coworker told me what's up.