FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 08-29-2012, 10:16 PM
Charles Plessy
 
Default Inconsistency between mime-support, shared-mime-info and file for PHP files media types.

[Copy sent to maintainers of mime-support, shared-mime-info, file and php5, as
an invitation to participate to the discussion.]

Le Sun, Aug 26, 2012 at 01:27:51PM -0700, Ben Hutchings a écrit :
> On Sun, 2012-08-26 at 19:55 +0200, Christoph Anton Mitterer wrote:
> >
> > With things like SVG it's quite tricky,... SVG has "application/" (as
> > most XML types will have)... the reason probably, that it's interpreted
> > into "drawing commands".
>
> I think the reason is that SVG is not usually read or written using
> generic text tools. Similarly the X bitmap type is image/x-xbitmap and
> not text/x-xbitmap, even though it can be read as ASCII text. (A new
> top-level type like 'vector' would have been better though.)

Hello everybody,

note that to solve the problem caused by interpreted files being sometimes seen
as application (or image) and sometimes seen as plain text, the FreeDesktop
Shared MIME-info Database specification introduces a new concept, "subclassing".

A type is a subclass of another type if any instance of the first type is
also an instance of the second. For example, all image/svg files are also
text/xml, text/plain and application/octet-stream files. Subclassing is about
the format, rather than the category of the data (for example, there is no
'generic spreadsheet' class that all spreadsheets inherit from).

http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#subclassing

In the case of unregistered media types, nothing prevents parallel systems to
report inconsistent information. This is what happens with PHP.

* mime-support does not associate .php files with media type anymore, although
text/x-php and application/x-php have been proposed.

* shared-mime-info has application/x-php as a subtype of text/plain.

* file has text/x-php for files that start by <?
or <?php.

If members of the upstream PHP community read this, how about standardising
throuhg the IANA, or if this was alredy proposed and rejected, at least through
a recommendation on the PHP web site ?

Have a nice day,

--
Charles Plessy
Tsurumi, Kanagawa, Japan


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120829221641.GB2556@falafel.plessy.net">http://lists.debian.org/20120829221641.GB2556@falafel.plessy.net
 

Thread Tools




All times are GMT. The time now is 01:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org