Index: /gsdl/trunk/cgi-bin/gliserver.pl
===================================================================
--- /gsdl/trunk/cgi-bin/gliserver.pl	(revision 19171)
+++ /gsdl/trunk/cgi-bin/gliserver.pl	(revision 19172)
@@ -492,4 +492,8 @@
 	$gsdl_cgi->generate_error("No collection specified.");
     }
+    
+    # language and region Environment Variable setting on the client side that was used to zip files.
+    my $client_lang = $gsdl_cgi->clean_param("lr");
+    $gsdl_cgi->delete("lr");
 
     # Ensure the user is allowed to edit this collection
@@ -517,4 +521,5 @@
     }
     my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionShell $java_args"; 
+    $java_command = "LANG=$client_lang $java_command" if $client_lang;
 
     my $java_output = `$java_command`;
@@ -543,4 +548,8 @@
     }
 
+    # language and region Environment Variable setting on the client side that was used to zip files.
+    my $client_lang = $gsdl_cgi->clean_param("lr");
+    $gsdl_cgi->delete("lr");
+   
     # Ensure the user is allowed to edit this collection
     &authenticate_user($gsdl_cgi, $username, $collection, $site);
@@ -563,4 +572,5 @@
     my $java_args = "\"$zip_file_path\" \"$collect_directory\" \"$collection\"";
     my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionArchives $java_args"; 
+    $java_command = "LANG=$client_lang $java_command" if $client_lang;
 
     my $java_output = `$java_command`;
@@ -584,4 +594,8 @@
 {
     my ($gsdl_cgi, $username, $timestamp, $site) = @_;
+
+    # language and region Environment Variable setting on the client side that was used to zip files.
+    my $client_lang = $gsdl_cgi->clean_param("lr");
+    $gsdl_cgi->delete("lr");
    
     # Users can be in any group to perform this action
@@ -597,4 +611,5 @@
     my $java_args = "\"$zip_file_path\" \"$collect_directory\" \"$username\" \"$user_groups\"";
     my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipCollectionConfigurations $java_args"; 
+    $java_command = "LANG=$client_lang $java_command" if $client_lang;
     my $java_output = `$java_command`;
     my $java_status = $?;
@@ -653,4 +668,7 @@
 	$gsdl_cgi->generate_error("No collection specified.");
     }
+    # language and region Environment Variable setting on the client side that was used to zip files.
+    my $client_lang = $gsdl_cgi->clean_param("lr");
+    $gsdl_cgi->delete("lr");
     my $file = $gsdl_cgi->clean_param("file");
     if ((!defined $file) || ($file =~ m/^\s*$/)) {
@@ -685,4 +703,5 @@
     my $java_args = "\"$zip_file_path\" \"$collection_directory\" \"$file\"";
     my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipFiles $java_args"; 
+    $java_command = "LANG=$client_lang $java_command" if $client_lang;
 
     my $java_output = `$java_command`;
@@ -709,4 +728,7 @@
     my $user_groups = &authenticate_user($gsdl_cgi, $username, "", $site);
 
+    # language and region Environment Variable setting on the client side that was used to zip files.
+    my $client_lang = $gsdl_cgi->clean_param("lr");
+    $gsdl_cgi->delete("lr");
     my $file = $gsdl_cgi->clean_param("file");
     if ((!defined $file) || ($file =~ m/^\s*$/)) {
@@ -734,4 +756,5 @@
     my $java_args = "\"$zip_file_path\" \"$web_inf_directory\" \"$file\"";
     my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.ZipFiles $java_args"; 
+    $java_command = "LANG=$client_lang $java_command" if $client_lang;
     my $java_output = `$java_command`;
 
@@ -1052,4 +1075,10 @@
     my $zip = $gsdl_cgi->clean_param("zip");
 
+    # language and region Environment Variable setting on the client side that was used to
+    # zip files. This needs to be consistent on both client and server sides, otherwise zip 
+    # and unzip seem to produce different values.
+    my $client_lang = $gsdl_cgi->clean_param("lr");
+    $gsdl_cgi->delete("lr");
+
     # Make sure we don't try to upload anything outside the collection
     if ($file =~ m/\.\./) {
@@ -1131,5 +1160,5 @@
 	my $java_args = "\"$file_path\" \"$directory_path\"";
 	my $java_command = "\"$java\" -classpath \"$java_classpath\" org.greenstone.gatherer.remote.Unzip $java_args"; 
-
+	$java_command = "LANG=$client_lang $java_command" if $client_lang;
 	my $java_output = `$java_command`;
 	my $java_status = $?;
