Index: /main/trunk/greenstone2/perllib/classify/AZCompactList.pm
===================================================================
--- /main/trunk/greenstone2/perllib/classify/AZCompactList.pm	(revision 33901)
+++ /main/trunk/greenstone2/perllib/classify/AZCompactList.pm	(revision 33902)
@@ -274,5 +274,5 @@
 		    $formatted_metavalue = $metavalue;
 		} else {
-		    $formatted_metavalue = &sorttools::format_metadata_for_sorting($self->{'metadata'},	 $metavalue, $doc_obj);
+		    $formatted_metavalue = &sorttools::format_metadata_for_sorting($self->{'metadata'},	 $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'});
 		}
 		
@@ -451,5 +451,5 @@
 		}
 
-		$formatted_node = &sorttools::format_metadata_for_sorting($self->{'metadata'}, $formatted_node) unless $self->{'no_metadata_formatting'};
+		$formatted_node = &sorttools::format_metadata_for_sorting($self->{'metadata'}, $formatted_node, undef,  $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'};
 
 		# In case our formatted string is empty...
Index: /main/trunk/greenstone2/perllib/classify/AZList.pm
===================================================================
--- /main/trunk/greenstone2/perllib/classify/AZList.pm	(revision 33901)
+++ /main/trunk/greenstone2/perllib/classify/AZList.pm	(revision 33902)
@@ -157,5 +157,5 @@
     
     
-    $metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj) unless $self->{'no_metadata_formatting'};
+    $metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'};
 	
     if (defined $self->{'list'}->{$doc_OID}) {
Index: /main/trunk/greenstone2/perllib/classify/AZSectionList.pm
===================================================================
--- /main/trunk/greenstone2/perllib/classify/AZSectionList.pm	(revision 33901)
+++ /main/trunk/greenstone2/perllib/classify/AZSectionList.pm	(revision 33902)
@@ -109,5 +109,5 @@
 	}
 	
-	$metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj) unless $self->{'no_metadata_formatting'};
+	$metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'};
 	if (defined $self->{'list'}->{"$doc_OID.$section"}) {
 	    my $outhandle = $self->{'outhandle'};
Index: /main/trunk/greenstone2/perllib/classify/DateList.pm
===================================================================
--- /main/trunk/greenstone2/perllib/classify/DateList.pm	(revision 33901)
+++ /main/trunk/greenstone2/perllib/classify/DateList.pm	(revision 33902)
@@ -153,5 +153,5 @@
     if (defined $self->{'sort'} && $self->{'sort'} ne "") {
 	$sort_other = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'sort'});
-	$sort_other = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sort_other, $doc_obj) unless $self->{'no_metadata_formatting'};
+	$sort_other = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sort_other, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'};
     }
     
Index: /main/trunk/greenstone2/perllib/classify/Hierarchy.pm
===================================================================
--- /main/trunk/greenstone2/perllib/classify/Hierarchy.pm	(revision 33901)
+++ /main/trunk/greenstone2/perllib/classify/Hierarchy.pm	(revision 33902)
@@ -168,5 +168,5 @@
 	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'});
 	    if (defined $sortmeta && !$self->{'no_metadata_formatting'}) {
-		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj);
+		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'});
 	    }
 	}
Index: /main/trunk/greenstone2/perllib/classify/SectionList.pm
===================================================================
--- /main/trunk/greenstone2/perllib/classify/SectionList.pm	(revision 33901)
+++ /main/trunk/greenstone2/perllib/classify/SectionList.pm	(revision 33902)
@@ -89,5 +89,5 @@
 	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'});
 	    if (defined $sortmeta && !$self->{'no_metadata_formatting'}) {
-		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj);
+		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'});
 	    }
 	}
@@ -146,5 +146,5 @@
 	# sorting on the classification metadata
 	# do the same formatting on the meta value as for sort meta
-	$metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj) unless $self->{'no_metadata_formatting'};
+	$metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'};
 	$self->{'list'}->{"$doc_OID.$section"} = $metavalue;
     }
Index: /main/trunk/greenstone2/perllib/classify/SimpleList.pm
===================================================================
--- /main/trunk/greenstone2/perllib/classify/SimpleList.pm	(revision 33901)
+++ /main/trunk/greenstone2/perllib/classify/SimpleList.pm	(revision 33902)
@@ -191,5 +191,5 @@
 	    $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'});
 	    if (defined $sortmeta && !$self->{'no_metadata_formatting'}) {
-		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj);
+		$sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'});
 	    }
 	}
@@ -199,5 +199,5 @@
 	# we add to the list based on metadata value
 	# but we need to do the same formatting as for sort value
-	($metavalue) = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj) unless $self->{'no_metadata_formatting'};
+	($metavalue) = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'};
 	$self->{'list'}->{$doc_OID} = $metavalue;
     }
