Index: trunk/aeres/scripts/aeresrh.py
===================================================================
--- trunk/aeres/scripts/aeresrh.py	(revision 182)
+++ trunk/aeres/scripts/aeresrh.py	(revision 183)
@@ -76,4 +76,9 @@
 
 $URL$
+
+- fplod 20120410
+
+  * real titles
+  * start dictionnary
 
 - fplod 20120409
@@ -178,5 +183,5 @@
     # detect title row
     for rownum in range(sh.nrows):
-        if sh.row_values(rownum)[0] == 't':
+        if sh.row_values(rownum)[0] == "Type d'emploi (EC, Ch, AP)":
 	    titlerow = rownum 
     if is_verbose == True:
@@ -197,5 +202,5 @@
     # detect surname column
     for colnum in range(sh.ncols):
-        if sh.col_values(colnum)[titlerow] == 'nom':
+        if sh.col_values(colnum)[titlerow] == 'Nom':
 	    colsurname = colnum
     if is_verbose == True:
@@ -204,5 +209,5 @@
     # detect firstname column
     for colnum in range(sh.ncols):
-	if sh.col_values(colnum)[titlerow] == 'prenom':
+	if sh.col_values(colnum)[titlerow] == u'Prénom':
 	    colfirstname = colnum
     if is_verbose == True:
@@ -211,5 +216,5 @@
     # detect arrival column
     for colnum in range(sh.ncols):
-	if sh.col_values(colnum)[titlerow] == u'arrivée':
+	if sh.col_values(colnum)[titlerow] ==  u"Date d'arriv\xe9e dans l'unit\xe9\n(9)":
 	    colarrival = colnum
     if is_verbose == True:
@@ -218,5 +223,5 @@
     # detect publi column
     for colnum in range(sh.ncols):
-	if sh.col_values(colnum)[titlerow] == u'publi':
+	if sh.col_values(colnum)[titlerow] ==  u'N\xb0 des 5 productions les plus significatives dans la p\xe9riode \xe9valu\xe9e\n(11)':
 	    colpubli = colnum
     if is_verbose == True:
@@ -282,11 +287,23 @@
     firstname_id = build_firstname_id(firstname)
     #
+    author_id = []
+    for index in range(len(surname_id)):
+        author_id.append('{surname_id}_{firstname_id}'.format(surname_id=surname_id[index], firstname_id=firstname_id[index]))
+
+    print('author id 0 %s ' % author_id[0])
+
     # populate dictionary
-    #++people = {}
-    #++for index, onesurname in enumarate(surname):
-    #++   print (' surname %s' % (surname))
-    #++   people[n] = surname[index]
-
-    find_in_dict(people, 'surname', 'Pinsard')
+    people = {}
+    keys = ('surname_id', 'firstname_id')
+    people = dict.fromkeys(author_id,keys)
+    people['COPPIN_elisabeth']
+    for index, oneauthor_id in enumerate(author_id):
+       people[oneauthor_id]
+       #people[oneauthor_id]['surname_id'] = surname_id[index]
+       #people[oneauthor_id]['firstname_id'] = firsname_id[index]
+    #   # people = {'pk1':{'firstname':'Brian', 'age':42}, 'pk2':{'firstname':'Alex', 'age':50}}
+
+    people['PINSARD_Francoise']
+    find_in_dict(people, 'surname', 'PINSARD')
 
 # Run main, if called from the command line
Index: trunk/aeres/scripts/build_firstname_id.py
===================================================================
--- trunk/aeres/scripts/build_firstname_id.py	(revision 182)
+++ trunk/aeres/scripts/build_firstname_id.py	(revision 183)
@@ -18,4 +18,6 @@
 
 :ref:`firstname_id.xsl`
+
+:mod:`unidecode`
 
 EXAMPLES
@@ -46,4 +48,7 @@
 import string
 import sys
+import re
+
+from unidecode import unidecode
 
 def build_firstname_id(firstname):
@@ -53,12 +58,19 @@
     >>> firstname = []
     []
-    >>> firstname.append(' Ginette')
-    [' Ginette']
-    >>> firstname.append('Gin ette ')
-    [' Ginette', 'Gin  ette']
-    >>> firstname.append("G\'in ette ")
-    [' Ginette', 'Gin ette', "G\'in ette"]
+    >>> firstname.append(u' Ginette')
+    >>> firstname
+    [u' Ginette']
+    >>> firstname.append(u'Gin ette ')
+    >>> firstname
+    [u' Ginette', u'Gin  ette ']
+    >>> firstname.append(u"G\'in ette ")
+    >>> firstname
+    [u' Ginette', u'Gin ette ', u"G\'in ette "]
+    >>> firstname.append(u"Gïnette")
+    >>> firstname
+    [u' Ginette', u'Gin ette ', u"G'in ette ", u'G\xefnette']
     >>> firstname_id = build_firstname_id(firstname)
-    ['ginette','ginette','ginette']
+    >>> #firstname_id
+    ['ginette', 'ginette', 'ginette', 'ginette']
     """
 
@@ -67,23 +79,37 @@
         sys.exit(-1)
 
-    # convert to str
-    #++firstname_str = [str(item) for item in firstname]
-    #++firstname_str = [item.encode('iso-8859-1','replace') for item in firstname]
-    firstname_str = [item.encode('iso-8859-1','xmlcharrefreplace') for item in firstname]
+    firstname_nondiacritics = []
     for item in firstname:
-        print ('iii : item type %s : %s ' % (item, type(item)))
+        #print ('iii : item row  %s ' % (item))
+        item_nondiacritics = unidecode(item)
+        #print ('iii : item non diacritics  %s ' % (item_nondiacritics))
+        firstname_nondiacritics.append(item_nondiacritics)
 
-    # remove white space before and after
-    firstname_id = map(str.strip,firstname_str)
-    #print ('1 sans blan debut fin %s' % firstname_id)
-    #
+    #for item in firstname_nondiacritics:
+    #    print ('iii : item type %s : %s ' % (item, type(item)))
+
+    sl = firstname_nondiacritics
+
+    # remove white space
+    firstname_noblanks =[]
+    for item in sl:
+        #print ('iii : item avant sup blancs %s ' % (item))
+        item_noblanks = re.sub(u' ',u'',item)
+        #print ('iii : item apres sup blancs %s ' % (item_noblanks))
+        firstname_noblanks.append(item_noblanks)
+
+    sl = firstname_noblanks
+
+
     # lower
-    firstname_id = map(str.lower,firstname_id)
-    #print ('2 upper %s' % firstname_id)
-    #
-    # remove white space inside
-    firstname_id_no_spaces = [x.replace(' ', '') for x in firstname_id]
-    #print ('3 sans blanc milieu %s' % firstname_id_no_spaces)
-    firstname_id = firstname_id_no_spaces
+    firstname_lower = []
+    for item in sl:
+        #print ('iii : item avant lower %s ' % (item))
+        item_lower = item.lower()
+        #print ('iii : item apres lower %s ' % (item_lower))
+        firstname_lower.append(item_lower)
+
+    sl = firstname_lower
+    firstname_id = sl
     #
     # remove punctuation
