[Lxoffice] OOo 1.1.4 et accent

Alain BarBason alain at barbason.be
Tue Jan 11 18:20:53 CET 2005


Yannick Warnier wrote:
> Le samedi 08 janvier 2005 à 20:57 +0100, Alain BarBason a écrit :
> 
>>Pas doué dans python et unicode, mais voila ce que j'ai.
>>
>>alain at linux:~/Documents> python -c "import os; os.rename('text.sxc', 
>>unicode('Frédéric.sxc','utf-8').encode('iso-8859-1'))"
>>Traceback (most recent call last):
>>   File "<string>", line 1, in ?
>>UnicodeDecodeError: 'utf8' codec can't decode bytes in position 2-4: 
>>invalid data
>>
>>Si j'enlève les "é", j'obtiens
>>
>>alain at linux:~/Documents> python -c "import os; os.rename('text.sxc', 
>>unicode('Frdric.sxc','utf-8').encode('iso-8859-1'))"
>>Traceback (most recent call last):
>>   File "<string>", line 1, in ?
>>OSError: [Errno 2] No such file or directory
>>alain at linux:~/Documents> ls
>>administratif         Divers          Image       palm             Psy 
>>            stoneglow  tmp
>>atrier                divers windows  Informatyk  petit programme 
>>Realisation     Technique  tmp.tmp
>>chloe 2004-23005.sxc  Ecolo           Java        phpwiki.sql.zip 
>>sek_ecrire.pps  test.sxc   vacances
> 
>                   ^^^^^^^^
> 
> et pas 'text.sxc' :)

Comme quoi, j'avais bien raisons d'envoyer le "ls" avec. :-)
Je ne dirais pas que j'ai deux mains gauches, vu que je suis gaucher, 
mais bon....


-- 
by AlainBB
http://www.barbason.be/index.php



More information about the Lxoffice mailing list