Index: /trunk/gsdl/bin/script/mkcol.pl
===================================================================
--- /trunk/gsdl/bin/script/mkcol.pl	(revision 2810)
+++ /trunk/gsdl/bin/script/mkcol.pl	(revision 2811)
@@ -164,5 +164,5 @@
     # load default plugins if none were on command line    
     if (!scalar(@plugin)) {
-	@plugin = (ZIPPlug,GMLPlug,TEXTPlug,HTMLPlug,EMAILPlug,
+	@plugin = (ZIPPlug,GAPlug,TEXTPlug,HTMLPlug,EMAILPlug,
 		   PDFPlug,RTFPlug,WordPlug,PSPlug,ArcPlug,RecPlug);
     }
Index: /trunk/gsdl/perllib/plugins/BasPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/BasPlug.pm	(revision 2810)
+++ /trunk/gsdl/perllib/plugins/BasPlug.pm	(revision 2811)
@@ -272,26 +272,8 @@
 	return undef;
     }
-    my $plugin_name = ref ($self);
     $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up
 
-    my ($language, $encoding);
-    if ($self->{'input_encoding'} eq "auto") {
-	# use textcat to automatically work out the input encoding and language
-	($language, $encoding) = $self->get_language_encoding ($filename);
-
-    } elsif ($self->{'extract_language'}) {
-	# use textcat to get language metadata
-	($language, $extracted_encoding) = $self->get_language_encoding ($filename);
-	$encoding = $self->{'input_encoding'};
-
-	if ($extracted_encoding ne $encoding && $self->{'verbosity'}) {
-	    print $outhandle "$plugin_name: WARNING: $file was read using $encoding encoding but ";
-	    print $outhandle "appears to be encoded as $extracted_encoding.\n";
-	}
-
-    } else {
-	$language = $self->{'default_language'};
-	$encoding = $self->{'input_encoding'};
-    }
+    # Do encoding stuff
+    my ($language, $encoding) = $self->textcat_get_language_encoding ($filename);
 
     # create a new document
@@ -308,4 +290,5 @@
 
     if (!length ($text)) {
+	my $plugin_name = ref ($self);
 	print $outhandle "$plugin_name: ERROR: $file contains no text\n" if $self->{'verbosity'};
 
@@ -384,4 +367,29 @@
 
     close FILE;
+}
+
+sub textcat_get_language_encoding {
+    my $self = shift (@_);
+    my ($filename) = @_;
+
+    my ($language, $encoding, $extracted_encoding);
+    if ($self->{'input_encoding'} eq "auto") {
+        # use textcat to automatically work out the input encoding and language
+        ($language, $encoding) = $self->get_language_encoding ($filename);
+    } elsif ($self->{'extract_language'}) {
+        # use textcat to get language metadata
+        ($language, $extracted_encoding) = $self->get_language_encoding ($filename);
+        $encoding = $self->{'input_encoding'};
+        if ($extracted_encoding ne $encoding && $self->{'verbosity'}) {
+	    my $plugin_name = ref ($self);
+	    my $outhandle = $self->{'outhandle'};
+            print $outhandle "$plugin_name: WARNING: $filename was read using $encoding encoding but ";
+            print $outhandle "appears to be encoded as $extracted_encoding.\n";
+        }
+    } else {
+        $language = $self->{'default_language'};
+        $encoding = $self->{'input_encoding'};
+    }
+    return ($language, $encoding);
 }
 
Index: /trunk/gsdl/perllib/plugins/ConvertToPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/ConvertToPlug.pm	(revision 2810)
+++ /trunk/gsdl/perllib/plugins/ConvertToPlug.pm	(revision 2811)
@@ -243,5 +243,4 @@
         return undef;
     }
-    my $plugin_name = ref ($self);
     $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up
 
@@ -257,32 +256,9 @@
 
     # Do encoding stuff
-    my ($language, $encoding);
-
-    # WordPlug's wvWare will always produce html files encoded as utf-8
-    if ($plugin_name eq "WordPlug") {
-	$self->{'input_encoding'} = "utf8";
-	$self->{'extract_language'} = 1;
-    }
-
-    if ($self->{'input_encoding'} eq "auto") {
-        # use textcat to automatically work out the input encoding and language
-        ($language, $encoding) = $self->get_language_encoding ($conv_filename);
-    } elsif ($self->{'extract_language'}) {
-        # use textcat to get language metadata
-
-	my ($extracted_encoding);
-        ($language, $extracted_encoding) = $self->get_language_encoding ($conv_filename);
-        $encoding = $self->{'input_encoding'};
-        if ($extracted_encoding ne $encoding && $self->{'verbosity'}) {
-            print $outhandle "$plugin_name: WARNING: $file was read using $encoding encoding but ";
-            print $outhandle "appears to be encoded as $extracted_encoding.\n";
-        }
-    } else {
-        $language = $self->{'default_language'};
-        $encoding = $self->{'input_encoding'};
-    }
+    my ($language, $encoding) = $self->textcat_get_language_encoding ($conv_filename);
 
     &BasPlug::read_file($self, $conv_filename, $encoding, $language, \$text);
     if (!length ($text)) {
+	my $plugin_name = ref ($self);
         print $outhandle "$plugin_name: ERROR: $file contains no text\n" if $self->{'verbosity'};
         return 0;
Index: /trunk/gsdl/perllib/plugins/WordPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/WordPlug.pm	(revision 2810)
+++ /trunk/gsdl/perllib/plugins/WordPlug.pm	(revision 2811)
@@ -32,4 +32,18 @@
 }
 
+sub new {
+    my $class = shift (@_);
+
+    my $self = new ConvertToPlug ($class, @_);
+
+    # wvWare will always produce html files encoded as utf-8
+    if ($self->{'input_encoding'} eq "auto") {
+	$self->{'input_encoding'} = "utf8";
+	$self->{'extract_language'} = 1;
+    }
+
+    return bless $self, $class;
+}
+
 sub get_default_process_exp {
     my $self = shift (@_);
@@ -37,6 +51,4 @@
     return q^(?i)\.doc$^;
 }
-    
-
 
 # do plugin specific processing of doc_obj for HTML type
