Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make encoder-marc21 more forgiving? #528

Open
dr0i opened this issue Apr 29, 2024 · 0 comments
Open

Make encoder-marc21 more forgiving? #528

dr0i opened this issue Apr 29, 2024 · 0 comments
Assignees

Comments

@dr0i
Copy link
Member

dr0i commented Apr 29, 2024

Came up in #527 :

If we parse (assumingly) crude binary MARC the encoding fails.
(first broken MRC seems to be 02589nas a2200601 c 4500 in https://raw.githubusercontent.com/gbv/Catmandu-Tutorial/master/data/marc.mrc (should be double checked with another MARC-validator other than MF:
Because MARCs binary directory of field 787 points to Iso646Constants.INFORMATION_SEPARATOR_2 = 0x1e the encoding breaks))

If an encoding breaks not only the field is dumped or the whole record but the whole stream. The dumping of the record and - more important- the whole stream can be avoided by piping decode-marc21 to catch-stream-exception before piping to encode-marc21.

a) if the record is indeed invalid:
aa) shall we make the encode-marc21 make more forgiving?
ab) or is it enough to bail out (as it is atm) resp. to expect the user to use catch-stream-exception resp. fix the invalid MARC ?
b) if the record is valid: fix encode-marc21

@dr0i dr0i removed their assignment Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

3 participants