Index: main/trunk/greenstone2/perllib/buildConfigxml.pm
===================================================================
--- main/trunk/greenstone2/perllib/buildConfigxml.pm	(revision 23894)
+++ main/trunk/greenstone2/perllib/buildConfigxml.pm	(revision 23895)
@@ -35,35 +35,5 @@
 no strict 'subs';
 
-# Wrapper that ensures the right version of XML::Parser is loaded given
-# the version of Perl being used.  Need to distinguish between Perl 5.6 and
-# Perl 5.8
-sub BEGIN {
-    my $perl_dir;
-
-    # Note: $] encodes the version number of perl
-    if ($]>=5.010) { 
-	$perl_dir = "perl-5.10";
-    }
-    elsif ($]>5.008) { 
-	# perl 5.8.1 or above
-	$perl_dir = "perl-5.8";
-    }
-    elsif ($]<5.008) {
-	# assume perl 5.6
-	$perl_dir = "perl-5.6";
-    }
-    else {
-	print STDERR "Warning: Perl 5.8.0 is not a maintained release.\n";
-	print STDERR "         Please upgrade to a newer version of Perl.\n";
-	$perl_dir = "perl-5.8";
-    }
-
-    if ($ENV{'GSDLOS'} !~ /^windows$/i) {
-	# Use push to put this on the end, so an existing XML::Parser will be used by default
-	push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir");
-    }
-}
-
-use XML::Parser;
+use XMLParser;
 
 
@@ -94,21 +64,12 @@
     }
 
+    # Removed ProtocolEncoding (see MetadataXMLPlugin for details)
+
     # create XML::Parser object for parsing metadata.xml files
-    my $parser;
-    if ($]<5.008) {
-	# Perl 5.6
-	$parser = new XML::Parser('Style' => 'Stream',
-				  'Handlers' => {'Char' => \&Char,
+    my $parser = new XML::Parser('Style' => 'Stream',
+				 'Pkg' => 'buildConfigxml',
+				 'Handlers' => {'Char' => \&Char,
 						 'Doctype' => \&Doctype
 						 });
-    }
-    else {
-	# Perl 5.8
-	$parser = new XML::Parser('Style' => 'Stream',
-				  'ProtocolEncoding' => 'ISO-8859-1',
-				  'Handlers' => {'Char' => \&Char,
-						 'Doctype' => \&Doctype
-						 });
-    }
 
     if (!open (COLCFG, $filename)) {
Index: main/trunk/greenstone2/perllib/collConfigxml.pm
===================================================================
--- main/trunk/greenstone2/perllib/collConfigxml.pm	(revision 23894)
+++ main/trunk/greenstone2/perllib/collConfigxml.pm	(revision 23895)
@@ -31,35 +31,5 @@
 no strict 'subs';
 
-# Wrapper that ensures the right version of XML::Parser is loaded given
-# the version of Perl being used.  Need to distinguish between Perl 5.6 and
-# Perl 5.8
-sub BEGIN {
-    my $perl_dir;
-
-    # Note: $] encodes the version number of perl
-    if ($]>=5.010) { 
-	$perl_dir = "perl-5.10";
-    }
-    elsif ($]>5.008) { 
-	# perl 5.8.1 or above
-	$perl_dir = "perl-5.8";
-    }
-    elsif ($]<5.008) {
-	# assume perl 5.6
-	$perl_dir = "perl-5.6";
-    }
-    else {
-	print STDERR "Warning: Perl 5.8.0 is not a maintained release.\n";
-	print STDERR "         Please upgrade to a newer version of Perl.\n";
-	$perl_dir = "perl-5.8";
-    }
-
-    if ($ENV{'GSDLOS'} !~ /^windows$/i) {
-	# Use push to put this on the end, so an existing XML::Parser will be used by default
-	push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir");
-    }
-}
-
-use XML::Parser;
+use XMLParser;
 
 # A mapping hash to resolve name discrepancy between gs2 and gs3.
@@ -126,22 +96,12 @@
     }
 
+    # Removed ProtocolEncoding (see MetadataXMLPlugin for details)
+
     # create XML::Parser object for parsing metadata.xml files
-    my $parser;
-    if ($]<5.008) {
-	# Perl 5.6
-	$parser = new XML::Parser('Style' => 'Stream',
-				  'Handlers' => {'Char' => \&Char,
+    my $parser = new XML::Parser('Style' => 'Stream',
+				 'Pkg' => 'collConfigxml',
+				 'Handlers' => {'Char' => \&Char,
 						 'Doctype' => \&Doctype
 						 });
-    }
-    else {
-	# Perl 5.8
-	$parser = new XML::Parser('Style' => 'Stream',
-				  'ProtocolEncoding' => 'ISO-8859-1',
-				  'Handlers' => {'Char' => \&Char,
-						 'Doctype' => \&Doctype
-						 });
-    }
-
     if (!open (COLCFG, $filename)) {
 	print STDERR "cfgread::read_cfg_file couldn't read the cfg file $filename\n";
Index: main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm	(revision 23894)
+++ main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm	(revision 23895)
@@ -133,23 +133,24 @@
     }
 	
+    # The following used to be passed in as a parameter to XML::Parser,
+    # if the version of perl was greater than or equal to 5.8. 
+    # The svn commit comment explaining the reason for adding this was
+    # not very clear and also said that it was quick fix and hadn't
+    # been tested under windows. 
+    # More recent work has been to make strings in Perl "Unicode-aware"
+    # and so this line might actually be potentially harmful, however
+    # it is not the case that we encountered an actual error leading to
+    # its removal, rather it has been eliminated in an attempt to tighten
+    # up the code. For example, this protocol encoding is not used in
+    # ReadXMLFile.
+    # 'ProtocolEncoding' => 'ISO-8859-1',
+
     # create XML::Parser object for parsing metadata.xml files
-    my $parser;
-    if ($]<5.008) {
-	# Perl 5.6
-	$parser = new XML::Parser('Style' => 'Stream',
+    my $parser = new XML::Parser('Style' => 'Stream',
                                   'PluginObj' => $self,
+                                  'Pkg' => 'MetadataXMLPlugin',
 				  'Handlers' => {'Char' => \&Char,
 						 'Doctype' => \&Doctype
 						 });
-    }
-    else {
-	# Perl 5.8 or greater
-	$parser = new XML::Parser('Style' => 'Stream',
-                                  'PluginObj' => $self,
-				  'ProtocolEncoding' => 'ISO-8859-1',
-				  'Handlers' => {'Char' => \&Char,
-						 'Doctype' => \&Doctype
-						 });
-    }
 
     $self->{'parser'} = $parser;
