Hello everybody
This is all my test code :
#!/usr/bin/env python
#-*- coding:Utf-8 -*-
from Tkinter import *
import Tkinter as tk
import tkFileDialog
import os
import ttk
import tkMessageBox
import psycopg2
from PIL import Image, ImageTk
import Image
import ImageTk
import os.path
chaine1 = "Bureau"
chaine2 = "Téléchargement"
listtest = []
listtest.append(chaine1)
listtest.append(chaine2)
chaine2.decode('UTF-8','strict')
chaine1.decode('UTF-8','strict')
print listtest[1]
print chaine2
print listtest
When i execute it , the result is :
Téléchargement
Téléchargement
I change decode to encode and the result is :
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
I tried to put
chaine2.encode('utf-8')
chaine1.encode('utf-8')
and it never print :
Téléchargement
Téléchargement
as I wish
thank you very much for helping me ... :)