Package: file Version: 4.12-1 Severity: normal file -i on an XML currently returns a blank mimetype. This is because the entries for XML are rather messed up in magic.mime.
My comments are about the magic.mime file shipped with 4.15, even though I'm running 4.12, so that hopefully I'm up to date and you can more easily use what I tell you. There seem to be two problems at least: first, the same entry for XML appears twice. Secondly, a third entry that matches XML files appears, namely that for SVG. That doesn't even work, because of the commented line between the two lines in it. As far as I can tell, the line # text/xml is a comment of what used to be on the previous line. The correct rule, which used to be there, I imagine, is: 0 string \<?xml text/xml >38 string \<!DOCTYPE\040svg image/svg+xml This works for both XML and SVG, but has a problem: for SVG files, it prints TWO mime types, which is a bit annoying for users. As far as I can tell, this is a design problem with the magic file format: there's no way for two different rules to match the same pattern. I don't know what you want to do about the SVG pattern: either leave it or comment it out, I guess, according to whether it's acceptable to get two MIME types (the user can always take the last one, for example, which will be the most specific). But it seems clear that the XML pattern needs fixing... -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.12-hibernate Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages file depends on: ii libc6 2.3.5-1ubuntu17 GNU C Library: Shared libraries an ii libmagic1 4.12-1 File type determination library us ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

