https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37184
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #6 from David Cook <[email protected]> --- (In reply to Phil Ringnalda from comment #5) > Oh, the encoding param in MARC::Record->new_from_xml is "what encoding do > you want for the record I return?" out of a choice of UTF-8 or MARC-8. I don't think that's quite right. The encoding param there should be the encoding of the incoming XML. So if the XML is MARC-8 it would unset the UTF-8 flag in the leader and make sure to output MARC-8 bytes (which would be a weird thing to do but that seems to be how it works). But in any case... OP is uploading a .mrc file which will run through C4::Import::RecordsFromISO2709File, which will convert MARC-8 records into UTF-8 records, which OP sort of notes is the encoding Koha uses internally. (In reply to Phil Ringnalda from comment #5) > I'd be happy to sign off a patch that skips setting $encoding and just > passes new_from_xml the string "UTF-8", and let QA worry about what on earth > someone was thinking passing $self->encoding. I think you're right about just passing in the string "UTF-8" because at this point the records should be UTF-8 encoded. Honestly looking at C4::ImportBatch::_create_import_record and friends...I have no idea why $encoding is even stored because it's useless at this point. Maybe if it was stored as "source_encoding" but the source file isn't there anyway. Who knows. Looking at 01d78e1ec71 it seems like $self->encoding was used here by accident. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
