[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: linking binfmt_misc with mime-types

>> In addition, the
>> kernel could be configured to assign default mime-types for different
>> file extensions, or something.
>You say a magic type database is a hack, and on the other hand file
>exetensions are a better indicator? Phew. Microsoft uses file extension
>(".tgz file" if it can't recognize). I think examining the content is a
>much better strategy.

This is one thing I didn't like myself.

The difficulty is when I create a new file, eg

vim myfile.html

(or just myfile).

what initialy mime type should be set? Perhaps the default should be no
mime type, which translates to a binary file. The user would manually
set the type as required. This is an extra step though, which currently
is only required for executable files, to set execute permission.


vim --mimetype=text/html myfile.html

vim would check that text/html is a valid mime type, eg by inspecting

As for Microsoft, do programs like Outlook even look at the mimetype? I
remember sending some people a "plain/text" mime type attachment, and
outlook got confused because it didn't recognise the file extension, and
forced the user to save the file to disk...
Brian May <bam@snoopy.apana.org.au>

Reply to: