Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
StreamReader reader = new StreamReader(@path.pathhtml + "\\Glossaire.htm", Encoding.UTF8);
                    string strline = reader.ReadLine();
                    string strtext = null;
                    strtext = strtext + strline;
 
                    while (strline != null)
                    {
                        strline = reader.ReadLine();
                        strtext = strtext + strline + Environment.NewLine;
                    }
                    reader.Close();
                    byte[] bytes = Encoding.Default.GetBytes(strtext);
                    strtext = Encoding.UTF8.GetString(bytes);
 
                    File.WriteAllText(@path.pathhtml + "\\Glossaire.htm", strtext);
les accents ne s'affiche pas, un symbole bizarre s'affiche a la place.....