Message: previous - next
Month: November 2011

Re: [trinity-devel] Kmailrc File Type.

From: Laurent Dard <f.couperin@...>
Date: Sun, 20 Nov 2011 22:54:33 +0100
Le 20/11/2011 18:30, Darrell Anderson a écrit :
> I created Bug Report 656 (
> Laurent, as you wrote and tested the patch you should submit/attach the patch to
> the bug report to receive credit. :)

Thanks. Done. (But deleting code is no glory...)

Description: unset the limit to line length in plain text files
 The 'TEXT_MAXLINELEN 300' constant is removed, as well as the test for long
 lines, in the 'textmagic' function, in kio/kio/kmimemagic.cpp.
 It made konqueror identify configuration files with long lines as files from
 unknown type.
 The bug is still present in the KDE4 code. It has already been reported
 (, but the report was closed.
 This bugfix doesn't solve other errors in file detection (debian/rules files
 not detected as "make files", wrong reports of "Java code", "Objective-C
 code", "diff"...). (
 Thanks to Darrell Anderson, Werner Joss and Richard J.M. Hill.
   [trinity-devel] kmailrc file type unknown
   [trinity-devel] Kmailrc File Type.

> Everybody who participated in this discussion, please add additional comments as
> necessary to describe your own observations with these mimetype quirks. :)

The 'unknown type' problem is solved.
For other problems, I'm opening another bug report:
where we can summarize all our discoveries.

Here is my summary:
Konqueror wrongly recognizes some files as of type:
* diff (as stated here:
* Java code (the gtkrc file type which is 'UTF-8 Unicode C++ program text')
* C++ header
* Objective-C code (/etc/apt/apt.conf)
* C source file (~/.gnome2/totem_config)

And it doesn't recognize other types
* email files with extension .eml are recognized as plain text and or not
  associated with mail programs.
* debian/rules files (debian source packages) are not always recognized as make

* Empty files without extension should be opened in text editors.
* Empty files with known extensions should be opened like other files
  (db.sqlite, if empty, can't be opened in kexi from konqueror)

Concerning text files which contains passwords:
* the string contains more than 301 characters: bug
* it contains control characters: data file (but it's astonishing)

Laurent Dard