Bug 7474 - UNIMARC: Error handling for 100$a incorrect value
Summary: UNIMARC: Error handling for 100$a incorrect value
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 15:54 UTC by Adrien SAURAT
Modified: 2022-12-07 00:26 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien SAURAT 2012-01-27 15:54:41 UTC
When editing a biblio, if the 100$a input is incorrect, the error is not correcly handled and we get a crash with a message like :

Unsupported UNIMARC character encoding [45] for XML output for UNIMARC; 100$a -> 0123456789A0123456789B0123456789C0123456789D0123456789E at /usr/share/perl5/MARC/File/XML.pm line 505.
Comment 1 Adrien SAURAT 2012-03-20 15:18:22 UTC
I don't totally understand this field, would it make sense to use the SetMarcUnicodeFlag function found in C4/Charset ?

Doing something like:
if ( $is_a_modif ) {
    ModBiblioframework( $biblionumber, $frameworkcode ); 
    ModBiblio( $record, $biblionumber, $frameworkcode );
}
else {
    eval { C4::Charset::SetMarcUnicodeFlag( $record, $frameworkcode )};
    if ( $@  ){
        warn "ERROR when setting Marc unicode flag: " . $@;
    }
    else {
        ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
    }
}

where the code we have now is simply like:
if ( $is_a_modif ) {
    ModBiblioframework( $biblionumber, $frameworkcode ); 
    ModBiblio( $record, $biblionumber, $frameworkcode );
}
else {
        ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
    }
}
Comment 2 Victor Grousset/tuxayo 2018-02-08 11:12:48 UTC
Adrien doesn't work anymore at BibLibre.
Unassigning this bug to give it more visibility.
Comment 3 Katrin Fischer 2019-04-28 21:49:52 UTC
(In reply to Victor Grousset/tuxayo from comment #2)
> Adrien doesn't work anymore at BibLibre.
> Unassigning this bug to give it more visibility.

Victor, would you be able to verify that the bug still exists? It seems related to UNIMARC as 100 has a different meaning in MARC21.