Changeset 28782
- Timestamp:
- 2014-01-15T14:11:21+13:00 (9 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/CSVPlugin.pm
r24794 r28782 94 94 my $self = shift (@_); 95 95 my ($filename, $encoding, $language, $textref) = @_; 96 my $outhandle = $self->{'outhandle'};97 96 98 # Read the CSV file content 99 open(FILE, $filename); 100 my $reader = new multiread(); 101 $reader->set_handle('CSVPlugin::FILE'); 102 $reader->set_encoding($encoding); 103 $reader->read_file($textref); 104 close(FILE); 97 # Read in file the usual ReadTextFile way 98 # This ensure that $textref is a unicode aware string 99 $self->SUPER::read_file(@_); 100 101 # 102 # Now top-up the processing of the text with what this plugin 103 # needs 104 # 105 105 106 106 # Remove any blank lines so the data is split and processed properly -
main/trunk/greenstone2/perllib/plugins/TabSeparatedPlugin.pm
r28669 r28782 96 96 my $self = shift (@_); 97 97 my ($filename, $encoding, $language, $textref) = @_; 98 my $outhandle = $self->{'outhandle'};99 98 100 # Read the Tab-separated file content 101 open(FILE, $filename); 102 my $reader = new multiread(); 103 $reader->set_handle('TabSeparatedPlugin::FILE'); 104 $reader->set_encoding($encoding); 105 $reader->read_file($textref); 106 close(FILE); 99 # Read in file the usual ReadTextFile way 100 # This ensure that $textref is a unicode aware string 101 $self->SUPER::read_file(@_); 102 103 # 104 # Now top-up the processing of the text with what this plugin 105 # needs 106 # 107 107 108 108 # Remove any blank lines so the data is split and processed properly
Note:
See TracChangeset
for help on using the changeset viewer.