Author serhiy.storchaka
Recipients Jim.Jewett, berker.peksag, corona10, gvanrossum, serhiy.storchaka, xtreak
Date 2020-07-28.07:07:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595920049.84.0.0756220007503.issue40841@roundup.psfhosted.org>
In-reply-to
Content
I think that both functions for detecting file type, by name and by content, are useful in different circumstances. We have similar more specific detection functions sndhdr and imghdr.

But I am not sure whether it should be a part of the mimetypes module or separate module. Should it use sndhdr and imghdr modules for audio and image types? Should it be a wrapper to the libmagic library (https://linux.die.net/man/3/libmagic) or reimplement it in Python?

If we add the code for detecting the file type based on algorithms used in browsers, should not we add also the code for detecting the text encoding based on other algorithms used in browsers, or it is too much?
History
Date User Action Args
2020-07-28 07:07:29serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, berker.peksag, Jim.Jewett, corona10, xtreak
2020-07-28 07:07:29serhiy.storchakasetmessageid: <1595920049.84.0.0756220007503.issue40841@roundup.psfhosted.org>
2020-07-28 07:07:29serhiy.storchakalinkissue40841 messages
2020-07-28 07:07:29serhiy.storchakacreate