Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Perl -T vs Mime::Types

by RonW (Parson)
on Sep 21, 2017 at 23:37 UTC ( #1199857=note: print w/replies, xml ) Need Help??


in reply to Perl -T vs Mime::Types

Or check that it matches application/octet-stream MIME type

Actually, for your purpose, text/plain would be the appropriate type.

-T is probably good enough to catch any files that aren't yet fully decoded/decompressed/etc.

Caveats: -T will accept valid UTF-8 encoded data as text. Also, even if the data isn't valid UTF-8, it will still allow some non-ASCII bytes and accept it as ASCII text. (The documentation says up to a third of the examined part of the file.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1199857]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2019-05-20 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (129 votes). Check out past polls.

    Notices?