On 2/2/07, Velko Hristov <[EMAIL PROTECTED]> wrote:
> Axel,
>
> if you run "mimedb *fish" on the four files from the previous post
> you'll get
>
> text/x-matlab
> application/octet-stream
> application/octet-stream
> application/octet-stream
>
> Do you have any idea why the last three of them are not recognized as
> text files?

Hmm, partially, yes.

I made a mistake in my previous mail, which also explains why the
mimedb command was so slow. The deafult behaviour for mimedb is to
determine mimetype by looking at the filename if that is enough, and
try to open the file and check for a magic cookie at the begining if
that fails. One has to use the -f switch to force mimedb to only use
the name of the file, which is much faster.

At least on my system, using '-f' has the side effect of making all
.fish have the same mimetype, namely application/octet-stream, which
is the default mimetype. There is no entry in the mimetype database
for fish files yet. For shame...

My guess as to why you get those inconsistent results is that the code
for checking for magic cookies is a bit optimistic and generates a few
false positives. I don't know, really, mimedb internally relies on the
xdgmime library for looking up mimetypes.

>
> Regards - Velko

-- 
Axel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to