Index: tmp/org.txm.libs.msoffice/src/org/txm/libs/msoffice/ReadExcel.java
===================================================================
--- tmp/org.txm.libs.msoffice/src/org/txm/libs/msoffice/ReadExcel.java	(revision 2958)
+++ tmp/org.txm.libs.msoffice/src/org/txm/libs/msoffice/ReadExcel.java	(revision 2959)
@@ -708,8 +708,8 @@
 		//
 		// columnsToCopy.put("Notes du titre", "subtitle"); // not working yet
 		// columnsToCopy.put("Titre propre", "title"); // not working yet
-		// columnsToCopy.put("Date de diffusion", "textorder"); // not working yet
-		// searchAndReplaceRules.put("textorder", new String[] {"../../....", "$3$2$1"}); // not working yet
+		// columnsToCopy.put("Date de diffusion", "text-order"); // not working yet
+		// searchAndReplaceRules.put("text-order", new String[] {"../../....", "$3$2$1"}); // not working yet
 
 		// sujets
 		table2File = new File("/home/mdecorde/TEMP/ANTRACT/AF/sujets.xlsx");
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/conversion/EuroPressToXML2018Macro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/conversion/EuroPressToXML2018Macro.groovy	(revision 2958)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/conversion/EuroPressToXML2018Macro.groovy	(revision 2959)
@@ -318,7 +318,7 @@
 metadataWriter.print columnSeparator+"date"
 metadataWriter.print columnSeparator+"words"
 metadataWriter.print columnSeparator+"pages"
-metadataWriter.print columnSeparator+"textorder" // date
+metadataWriter.print columnSeparator+"text-order" // date
 metadataWriter.println ""
 		
 def files = []
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/BuildAFMetadataMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/BuildAFMetadataMacro.groovy	(revision 2958)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/BuildAFMetadataMacro.groovy	(revision 2959)
@@ -53,9 +53,9 @@
 	
 	//columnsToCopy.put("Notes du titre", ["subtitle"] as String[]);
 	columnsToCopy.put("Titre propre", ["title"] as String[]); 
-	columnsToCopy.put("Date de diffusion", ["textorder"] as String[]);
+	columnsToCopy.put("Date de diffusion", ["text-order"] as String[]);
 	
-	searchAndReplaceRules.put("textorder", ["([0-9][0-9])/([0-9][0-9])/([0-9][0-9][0-9][0-9])", '$3$2$1'] as String[]); // not working yet
+	searchAndReplaceRules.put("text-order", ["([0-9][0-9])/([0-9][0-9])/([0-9][0-9][0-9][0-9])", '$3$2$1'] as String[]); // not working yet
 	
 	
 	
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 2958)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 2959)
@@ -122,7 +122,7 @@
 	for (String t : metadatas.keySet()) {
 		def ti = metadatas.get(t)
 		for (org.txm.metadatas.Entry e : ti) {
-			if ("textorder".equals(e.getId())) {
+			if ("text-order".equals(e.getId())) {
 				String k = ""+t+".xml" // the sort test will use the xml-txm file names
 				textordersInfo[k] = e.value
 			}
@@ -250,7 +250,7 @@
 	} // end of importer and annotate steps
 	
 	xmltxmFiles = new ArrayList<File>(Arrays.asList(txmDir.listFiles()));
-	if (metadatas != null && metadatas.getPropertyNames().contains("textorder")) {
+	if (metadatas != null && metadatas.getPropertyNames().contains("text-order")) {
 		Collections.sort(xmltxmFiles, new Comparator<File>() {
 					public int compare(File f1, File f2) {
 						String o1 = textordersInfo[f1.getName()];
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImport.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImport.groovy	(revision 2958)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImport.groovy	(revision 2959)
@@ -72,7 +72,7 @@
 		for (String t : metadata.keySet()) {
 			def ti = metadata.get(t)
 			for (org.txm.metadatas.Entry e : ti) {
-				if ("textorder".equals(e.getId())) {
+				if ("text-order".equals(e.getId())) {
 					textorder[t] = e.getValue()
 				}
 			}
Index: tmp/org.txm.utils/src/org/txm/utils/AsciiUtils.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/AsciiUtils.java	(revision 2958)
+++ tmp/org.txm.utils/src/org/txm/utils/AsciiUtils.java	(revision 2959)
@@ -171,7 +171,8 @@
 		if (s.length() == 0) {
 			return s;
 		}
-		String rez = s.replaceAll("\\p{Space}++", "_");
+		String rez = s.trim();
+		s = s.replaceAll("\\p{Space}++", "_");
 		rez = rez.replaceAll("_", "-");
 		rez = convertNonAscii(rez).toLowerCase();
 		
