KMimeType::isBufferBinaryData() is broken
Ralf Habacker
ralf.habacker at freenet.de
Sat May 5 19:22:35 BST 2007
Andreas Pakulat schrieb:
> Hi,
>
> just found out that isBufferBinaryData fails to recognize plain/text
> when there's a linefeed in the first 32 bytes. IMHO the check should
> check for bytes in the range 00-0A, 0B-0C and 0E-1F, i.e. leave out
> linefeed and carriage return. Those two ascii control characters are
> valid in plain/text.
>
> The attached patch does this, objections against committing?
>
either the line
+ char c = p[i];
is obsolate or c should be used in the following if statement
+ if (c < 32 && c != 10 && c != 13) // ASCII control character
Ralf
More information about the kde-core-devel
mailing list