Python regex and accented Expression -


this question has answer here:

i have problem python regex treatment bloc when deals accented expression. when run code:

import re title = ur"titre : c'est pas gréable à infos:" print title m = re.findall(":(.+?) infos",title , re.unicode) print unicode((m)) 

i have result:

titre : c'est pas gréable à infos: [u" c'est pas gr\xe9able \xe0"] 

i need able keep accented expression in result output. helping

try :

  print unicode((m), 'utf-8').encode('utf-8') 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -