[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Towards standardising mime-type support

From: David Faure <faure_at_kde.org>
Date: 2005-04-01 11:16:57 CEST

On Friday 01 April 2005 09:38, Trent Apted wrote:
> This would not be platform-specific.

The "file" program itself is platform-specific, i.e. it might not be installed (e.g. on Windows).

> Actually, looking further it
> appears that the heuristic for c/c++ files is that if a file starts with
> "/*" it is C, and if with "//" it is C++. `0xbabe` is a Java class file,
> etc.

If you want to implement any detection of mimetypes, the best thing to do
would be to use the freedesktop.org mimetype standard to avoid re-inventing
the wheel.
(also comes with implementations, which you would be able to reuse).

David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Apr 1 11:19:48 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.