comment afficher les caractère comme é avec UTF-8
Salut a tous
je veut savoir comment je peut afficher les caractère comme "é" correctement si j'utilise le Unicode UTF-8 et comment éviter d'afficher sa '' \xef\xbb\xbfun \xe3\xa9 ''
voici mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
punc=('!','.',':',',')
dictfile={}
listFile=[]
listmot=[]
for mot in listfile:
listFile.append(mot)
for j in range(len(listFile)):
f=open(listFile[j],'r')
t=f.read()
t=t.lower()
for punct in punc:
t = t.replace(punct," ")
listmot=t.split(" ")
dictfile[str(listFile[j].split('\\')[-1])]= listmot |
Merci