Shaare your links...
29308 links
Liens en vrac de sebsauvage Home Login RSS Feed ATOM Feed Tag cloud Picture wall Daily
Links per page: 20 50 100
page 1 / 1
  • astuces python
    Comment supprimer tous les accents d'un contenu html sans toucher aux balises - HowTommy | Liens et actu en vrac
    Rappel: « Python comes with batteries included »  ;-)

    Solution 1 : a = u'éàùî'; print a.encode('ascii', 'xmlcharrefreplace')

    Solution 2 : boucler sur les caractères et passer par htmlentitydefs.codepoint2name   (http://docs.python.org/library/htmllib.html#module-htmlentitydefs)

    De rien  :o)

    EDIT: Et pour l'opération inverse: http://sebsauvage.net/python/snyppets/#decodehtmlentities
    2012-06-06 18:25:23
    http://liens.howtommy.net/index.php?gntKMQ
Links per page: 20 50 100
page 1 / 1
Shaarli 0.0.41 beta modifiée - 2022-08-11 - The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net. Theme by idleman.fr. I'm on Mastodon.
shelter.moe