Zim

Comment 3 for bug 705479

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 705479] Re: indexing fails silently with non-utf8 text attachments

On Fri, Jan 21, 2011 at 5:21 PM, Oliver Joos <email address hidden> wrote:
> Zim pages are always utf8, and that seems perfectly ok to me.
>
>> build in such a check and ignore any file that does not have the zim headers
> Yes, I think so. But I don't see why this would slow down something. All .txt files are opened anyway now. The additional check would mean that with certain .txt files Zim can stop reading after the first few lines and does not have to update its outline ect. - so less I/O and less CPU needed. Files with other postfixes should not be affected at all.

This is correct for indexing. However there are a few more places
where the directory listing is used. Need to double check those and
make them use the index instead.

Also need to make the filtering for the attachment folder more
advanced. Now it just ignores any text files, should be updated to
only ignore zim page text files.

> An important question is: which part(s) of the header does identify a Zim page? It should stay easy to add a Zim page with an external text editor or script.

That would just be the first line, the Content-Type line.

-- Jaap