Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_se

sara -  
 sara -
hi, i have a problem when executing my code ,it appears a pango-warning and i don't know if the problem is in my code,please help me to find the error

and this is the warning:
Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

and this is a part of my code:

void on_button1_clicked(Gtkwidget *objet_graphique, gpointer user_data)
{
int j,n;
struct personne tableau2[];
char chemin2[]="personne.txt";
struct personne Buf[1000]="";
struct personne Buf0[50]="identifiant";
Gtkwidget *label1;

label1=lookup_widget(objet_graphique,"label1");
fonction2(chemin2,tableau2[]);
for(j=0;j<n;j++)
{
sprintf(Buf,"%s %s\n\n",Buf0,tableau2[j].identifiant);

}
gtk_label_set_text(GTK_LABEL(label1),Buf);

}

2 réponses

  1. Sugel Messages postés 4293 Date d'inscription   Statut Membre Dernière intervention   728
     
    Hey !

    I don't know why you posted here, but you're on a french forum.

    And french people aren't that good at english ;-)

    However, variables from your code are in french. So why the hell are you writting in english ?

    0
  2. sara
     
    bonsoir, j'ai un problème lors de l'éxécution de mon code ,il apparait à chaque fois un warning de ce type:
    Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

    et j'ai pas connu si le problème est issue de la facon dont j'écris mon code, s'il vous plait aidez moi à trouver l'erreur
    (je suis entrain de lire à partir d'un fichier et lors du clic sur le bouton je dois avoir ce contenu affiché dans un label)

    et voici une partie de mon code:

    void on_button1_clicked(Gtkwidget *objet_graphique, gpointer user_data)
    {
    int j,n;
    struct personne tableau2[];
    char chemin2[]="personne.txt";
    struct personne Buf[1000]="";
    struct personne Buf0[50]="identifiant";
    Gtkwidget *label1;
    label1=lookup_widget(objet_graphique,"label1");
    fonction2(chemin2,tableau2[]);
    for(j=0;j<n;j++)
    {
    sprintf(Buf,"%s %s\n\n",Buf0,tableau2[j].identifiant);
    }
    gtk_label_set_text(GTK_LABEL(label1),Buf);
    }
    0