Changeset 22857
- Timestamp:
- 2010-09-06T19:08:11+12:00 (13 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
r22842 r22857 1296 1296 1297 1297 $$text =~ s/\s+/ /g; # remove \n's 1298 1299 # At this point $$text is a binary byte string 1300 # => turn it into a Unicode aware string, so full 1301 # Unicode aware pattern matching can be used. 1302 # For instance: 's/\x{0101}//g' or '[[:upper:]]' 1303 # 1304 1305 $$text = decode("utf8",$$text); 1298 1306 } 1299 1307 -
main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm
r22853 r22857 89 89 use strict; 90 90 no strict 'refs'; 91 92 use Encode; 93 91 94 use BasePlugin; 92 95 use util; … … 339 342 } 340 343 elsif ($element eq "Metadata") { 341 &metadatautil::store_saved_metadata($self,$self->{'metadata_name'}, $self->{'metadata_value'}, $self->{'metadata_accumulate'}); 344 my $metadata_name = decode("utf8",$self->{'metadata_name'}); 345 my $metadata_value = decode("utf8",$self->{'metadata_value'}); 346 347 &metadatautil::store_saved_metadata($self, 348 $metadata_name, $metadata_value, 349 $self->{'metadata_accumulate'}); 342 350 $self->{'metadata_name'} = ""; 343 351 } -
main/trunk/greenstone2/perllib/plugins/ReadTextFile.pm
r22844 r22857 222 222 } 223 223 224 # At this point $$te stref is a binary byte string224 # At this point $$textref is a binary byte string 225 225 # => turn it into a Unicode aware string, so full 226 226 # Unicode aware pattern matching can be used. … … 235 235 236 236 # Not currently used 237 sub read_file_usingPerlsEncodeModule { 237 sub UNUSED_read_file_usingPerlsEncodeModule { 238 ##sub read_file { 238 239 my $self = shift (@_); 239 240 my ($filename, $encoding, $language, $textref) = @_;
Note:
See TracChangeset
for help on using the changeset viewer.