Re: Problems with gtk_set_locale and gnome_init



I know the solution already:
If you use a no_english enviroment when you use gnome_init or
gtk_set_locale you must use setlocale(LC_NUMERIC,"POSIX")
to write a decimal point.

      Eusebio.

Jose Eusebio Roza Pando escribió:

Ahhh! This is the problem. The ps generation engine use fprintf and
it generates the ps file with a comma instead of a decimal point
(in Spanish machines).

Thank you very much for your help Martin,
         Eusebio

mk daveg com escribió:

Jose Eusebio Roza Pando wrote:
I am writting a gtk+ app  with gtk+extra library. This is my problem:
- I use gtk_init and my app works and i can print ps files,
   but if i use gtk_set_locale too, i can not print ps files. The ps
   is generated but the viewer can not show it.

I am just learning to use locale support myself, but i have noticed that
gtk_set_locale seems to affect the decimal separator in floating point
output as well, so any fprintf(file,"%f\n",somevalue) may end up with
a comma instead of a decimal point in some locales. Much to my surprise,
localized message files work without calling gtk_set_locale and setlocale.

Hope this helps,
Martin
--
Dr. Martin Kroeker, daVeg GmbH Darmstadt  CAD/CAM/CAQ  mk daveg com
                      Precision Powered by Penguins

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]