Hi 

I'm sorry if this is OT

I'm working with a application that uses swedish characters and i have a 
problem with displaying swedish characters with gtk_label. I can use ��� when 
the label is created and it display it correctly but then i use 
gtk_label_set_text() to update the text, it stops the word when the swedish 
characer occurs. Looks something like this ...

Original word i want to display:
Norrk�ping

Result i get with gtk_label_set_text():
Norrk
and it's cut where the swedish character should be.  I guess it have to do with 
language setting in some way.

My code looks like this:

--- start code block ---
//              Adress
                fgets(post,500,temp);
                strncpy(field,post,cut_string(post));
                strncat(field," ",1);
                memset(post,0,strlen(post));            
                fgets(post,500,temp);                           
                strncat(field,post,cut_string(post));
                
                fgets(post,500,temp);
                strncat(field,post,cut_string(post));
                entry_widget = lookup_widget(GTK_WIDGET(button), "label27");
                gtk_label_set_text ((GtkLabel*) entry_widget, field);
                memset(post,0,strlen(post));
                memset(field,0,cut_string(post));
--- end code block ---

I'm thankful for any hint or suggestion.

Thanks 
Magnus
_______________________________________________
gnome-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-devel-list

Reply via email to