[gmime-devel] Suggestions on is_mbox_marker() function



Hi,
 
Good day!
We recently encounter some problems for parsing eml files of mbox format,
and we would like to provide some suggestions on is_mbox_marker() function.
 
GMime 2.6.x library works well for the beginning line "From sender date ..." of the mbox formatted eml file.
However, for lines like ">>From sender date ...", it just failed to parse.
 
We have noticed that in GMime 3.x library, there's a function called is_mbox_marker() function.
It seems that it now can handle two types of mbox beginning line, including "From " and ">From ".
But for the other variants, it still results in parsing failed.
 
Here we find out some information about these variants:
https://www.loc.gov/preservation/digital/formats/fdd/fdd000383.shtml
(MBOX, MBOXO, MBOXRD, ...)
 
Since there can be many '>' characters before the "From " string, we suggest to check these cases in is_mbox_marker() function.
For example, using a while loop to proceed the prefixing '>' characters instead of only advance one time.
 
Because we are not that familiar with the implementation details of  GMime library,
we wrote this mail in order to provide this ideas, and we would like to know if this works for those mbox variants.
 
Thank you!
 
Best regards,
Kevin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]