Changeset 12683


Ignore:
Timestamp:
2006-09-06T09:25:05+12:00 (18 years ago)
Author:
kjdon
Message:

check for a byte order marker and strip it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/PagedImgPlug.pm

    r12270 r12683  
    575575    close ITEMFILE;
    576576    open (ITEMFILE, $filename) || die "couldn't open $filename\n";
     577    $line = <ITEMFILE>;
     578    $line =~ s/^\xEF\xBB\xBF//; # strip BOM
     579    $line =~ s/\x0B+//ig;
     580    $line =~ s/&/&amp;/g;
     581    print BACKUP ($line);
    577582    #Tidy up the item file some metadata title contains \vt-vertical tab
    578583    while ($line = <ITEMFILE>) {
     
    585590    &File::Copy::copy ($backup_filename, $filename);
    586591    &util::rm($backup_filename);
    587     #print STDERR "xml version = $xml_version\n";
     592
    588593    my $doc_obj;
    589594    if ($xml_version) {
Note: See TracChangeset for help on using the changeset viewer.