OT: Problem with swedish characters and gtk_label
- From: Magnus Wirström <asdlinux yahoo se>
- To: gnome-devel-list gnome org
- Subject: OT: Problem with swedish characters and gtk_label
- Date: Fri, 29 Apr 2005 22:04:32 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]