hi, sorry to relaunch this topie but I really need this to work. (o.o)'
how can I have an unicode pickled data ??? e.g. a={'partition': u'/export/diskH1/home_evol/ricquebo', 'rsmFirstname': u'Fran\xe7ois', 'rsmLastname': u'Ricquebourg', 'size': u'8161222.0', 'size_max': '1'} <(hint: rsmFirstname = françois)> import pickle q=pickle.dumps(a) >>> type(q) <type 'str'> so this is a string >>> unicode(q) Traceback (most recent call last): File "<stdin>", line 1, in ? UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 64: ordinal not in range(128) at position 64 >>> q[:64] "(dp0\nS'rsmLastname'\np1\nVRicquebourg\np2\nsS'rsmFirstname'\np3 \nVFran" there is the ç : it's the a special 'c' In fact, what I really need is the ability to push a dictionary (which can contain unicode) in a postgres database. and the sql command given are in unicode. Thus I need to transform a dictionnary--to-->unicode and then, do the inverse operation unicode--to-->dictionnary Cedric BRINER _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor