RFC: control character in a MARC record?
I've been helping someone debug a problem saving records from the reservoir to their catalogue and it seems that one of their sources has subtle errors in their data. The source record contains some control characters. One of the MARC:: modules reacts badly to that and crashes Koha. Is there ever a reason to include a non-printing control character in a MARC record and could/should Koha filter them all out? Thanks for any pointers, -- MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op. http://koha-community.org supporter, web and LMS developer, statistician. In My Opinion Only: see http://mjr.towers.org.uk/email.html Available for hire for Koha work http://www.software.coop/products/koha
Yes, IMHO, Koha should filter them out. First of all, CR or LF. They break the binary form of the record. Stefano On Mar 12, 2011, at 14:08 , MJ Ray wrote:
Is there ever a reason to include a non-printing control character in a MARC record and could/should Koha filter them all out?
Hi, On Mar 12, 2011, at 8:08 AM, MJ Ray wrote:
I've been helping someone debug a problem saving records from the reservoir to their catalogue and it seems that one of their sources has subtle errors in their data. The source record contains some control characters. One of the MARC:: modules reacts badly to that and crashes Koha.
Depending on how the MARC:: module in question is crashing, that could also be construed as a bug in that module as well. Would you mind filing a bug at rt.cpan.org or sending details to perl4lib as well? Regards, Galen -- Galen Charlton VP, Data Services Equinox Software, Inc. / Your Library's Guide to Open Source email: gmc@esilibrary.com direct: +1 352-215-7548 skype: gmcharlt web: http://www.esilibrary.com/
Galen Charlton wrote:
On Mar 12, 2011, at 8:08 AM, MJ Ray wrote:
I've been helping someone debug a problem saving records from the reservoir to their catalogue and it seems that one of their sources has subtle errors in their data. The source record contains some control characters. One of the MARC:: modules reacts badly to that and crashes Koha.
Depending on how the MARC:: module in question is crashing, that could also be construed as a bug in that module as well. Would you mind filing a bug at rt.cpan.org or sending details to perl4lib as well?
I don't mind filing a bug but I don't have a neat problem report for this yet. Two problems which I'm working on: 1. I'm not sure which MARC:: module is in question. Koha doesn't seem to be sending anything back to Apache, so the log message is the uninformative "Error reading request entity data" one; 2. A record that crashes one catalogue works fine on another, so I suspect that there may be some interaction with authorities configuration. Does anyone have a record that consistently crashes Koha with the offer to download addbiblio.pl and that log message, and/or do you know which system preferences cause it? Yes, I'm looking for a shortcut, so I'd really like to know if a control character should ever be in the record. Hope that explains, -- MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op. http://koha-community.org supporter, web and LMS developer, statistician. In My Opinion Only: see http://mjr.towers.org.uk/email.html Available for hire for Koha work http://www.software.coop/products/koha
MJ Ray schreef op ma 14-03-2011 om 14:54 [+0000]:
Yes, I'm looking for a shortcut, so I'd really like to know if a control character should ever be in the record.
We have some libraries with newlines in records, as we had to have a method of keeping the data from their previous system intact, and this was the only reasonably effective way. We have a patch (that I sent upstream, I can't recall if it went in) that formats them with <br /> in output. I'm not sure if it's strictly legal according to MARC, but it was necessary. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
participants (4)
-
Galen Charlton -
MJ Ray -
Robin Sheat -
Stefano Bargioni