Bug 5909 : SetUTF8Flag on any incoming data

This prompts NFC normalization on adding record
Therefore, any saved record will be NFC normalized

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 6b4512d5c4)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
Henri-Damien LAURENT 2011-03-22 10:59:52 +01:00 committed by Chris Nighswonger
parent 4acfba5bdb
commit dc9c4fa437
2 changed files with 4 additions and 1 deletions

View File

@ -621,6 +621,7 @@ sub AddAuthority {
$f5->update($time.".0");
}
SetUTF8Flag($record);
if ($format eq "MARC21") {
if (!$record->leader) {
$record->leader($leader);
@ -647,7 +648,7 @@ sub AddAuthority {
}
if (($format eq "UNIMARCAUTH") && (!$record->subfield('100','a'))){
$record->leader(" nx j22 ");
$record->leader(" nx j22 ") unless ($record->leader());
my $date=POSIX::strftime("%Y%m%d",localtime);
if ($record->field('100')){
$record->field('100')->update('a'=>$date."afrey50 ba0");

View File

@ -248,6 +248,7 @@ sub AddBiblio {
my $dbh = C4::Context->dbh;
# transform the data into koha-table style data
SetUTF8Flag($record);
my $olddata = TransformMarcToKoha( $dbh, $record, $frameworkcode );
( $biblionumber, $error ) = _koha_add_biblio( $dbh, $olddata, $frameworkcode );
$olddata->{'biblionumber'} = $biblionumber;
@ -292,6 +293,7 @@ sub ModBiblio {
logaction( "CATALOGUING", "MODIFY", $biblionumber, "BEFORE=>" . $newrecord->as_formatted );
}
SetUTF8Flag($record);
my $dbh = C4::Context->dbh;
$frameworkcode = "" unless $frameworkcode;