Ticket #1285: diff.2.patch

File diff.2.patch, 646 bytes (added by tome, 3 years ago)
  • lib/Padre/MimeTypes.pm

     
    799799            # of bits and Padre/Perl simply has the wrong point of view (UTF-8), 
    800800            # so we drop these warnings: 
    801801            local $SIG{__WARN__} = sub { 
     802                                # Die if we throw a bad codepoint - this is a binary file. 
     803                                die $_[0] if $_[0] =~ /Code point .* is not Unicode/; 
    802804                print STDERR $_[0] . ' while looking for mime type of $filename' 
    803805                    unless $_[0] =~ /Malformed UTF\-8 char/; 
    804806            };