Closed bfontaine closed 9 years ago
You’d need to do that before having gedcom4j parse the data.
Best of luck!
On October 28, 2014 at 12:20:30 PM, Baptiste Fontaine (notifications@github.com) wrote:
Hello,
I need to parse some GEDCOM files with empty lines, which are disallowed in the official specification. Do I have to pre-process each file to remove empty lines or is there a way to do that with gedcom4j?
— Reply to this email directly or view it on GitHub.
Thanks!
I’m pre-processing files to remove empty lines, but I just re-read the specification (draft release 5.5.1), and on page 11, it says (emphasis mine):
Leading white space (tabs, spaces, and extra line terminators) preceding a GEDCOM line should be ignored by the reading system. Systems generating GEDCOM should not place any white space in front of the GEDCOM line.
“extra line terminators” could include empty lines (an empty line is just two \n
s, which are “leading extra line terminators” if there’s a record after them).
So in fact empty lines are allowed by the specification if I correctly understand the quoted text.
Good catch! I will address this ASAP.
On Wed, Oct 29, 2014 at 1:19 PM, Baptiste Fontaine <notifications@github.com
wrote:
I’m pre-processing files to remove empty lines, but I just re-read the specification (draft release 5.5.1), and on page 11, it says (emphasis mine):
Leading white space (tabs, spaces, and extra line terminators) preceding a GEDCOM line should be ignored by the reading system. Systems generating GEDCOM should not place any white space in front of the GEDCOM line.
“extra line terminators” could include empty lines (an empty line is just two \ns, which are “leading extra line terminators” if there’s a record after them).
So in fact empty lines are allowed by the specification if I correctly understand the quoted text.
— Reply to this email directly or view it on GitHub https://github.com/frizbog/gedcom4j/issues/64#issuecomment-60965802.
Released in v2.1.9.
Great!
Hello,
I need to parse some GEDCOM files with empty lines, which are disallowed in the official specification. Do I have to pre-process each file to remove empty lines or is there a way to do that with
gedcom4j
?