MIME updates

Thomas Leonard tal00r at ecs.soton.ac.uk
Tue Oct 14 17:27:33 EEST 2003

On Mon, Oct 13, 2003 at 05:04:05PM +0200, Jaap Karssenberg wrote:
> On Sun, 12 Oct 2003 16:26:03 +0100 Thomas Leonard wrote:
> : Here are my proposed changes to the MIME spec. This adds
> : <sub-class-of> and <alias> for KDE. It also makes a couple of other
> : clarifications.
> <SNIP>
> : You can also find the new version on the web:
> : 
> : 	http://www.ecs.soton.ac.uk/~tal00r/info.html
> I really like the sub class mechanism, below some random thoughts while
> reading the spec.
> What is the usage of aliases ? And maybe more importantly: is their
> usage recommended outside KDE ?

Aliases are for when you've got a MIME type from some external source, and
you want the 'standard' name. It also lets us deprecate old MIME names
(x-midi -> midi, etc). I think everyone should support it.

Currently, there is no output 'aliases' file to make this easy, but there
will be. Don't let that stop anyone from adding updates to the XML as it
is now...

> You mention 'implicit' sub classes, maybe you could supply a definite
> list of these (possibly in a machine readable format in the mime-info
> database) -- or are it just the two mentioned already ?

I think it's just the two mentioned. The reason being that they're so
common we don't want to have to specify them for every type (eg, state
that audio/x-midi is an application/octet-stream, etc).

> Is there a portable way for determining whether a directory in a mount
> point ?

For mounted mount points it's easy -- compare st_dev for the directory and
its parent (Python does it this way too). Doing fstab portably to cope
with potention mount-points is another matter. Probably only file managers
care about that anyway, though.

> Could the default method for deciding between application/octet-stream
> and text/plain be specified in more detail, what -for example- is a sane
> number of chars to check from the beginning of the file ?

Does 32 sound reasonable?

Thomas Leonard			http://rox.sourceforge.net
tal00r at ecs.soton.ac.uk	tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1

More information about the xdg mailing list