41a383
diff -ruN paps-0.6.6.orig/src/libpaps.c paps-0.6.6/src/libpaps.c
41a383
--- paps-0.6.6.orig/src/libpaps.c	2007-03-27 20:25:00.000000000 +0900
41a383
+++ paps-0.6.6/src/libpaps.c	2007-03-27 20:31:15.000000000 +0900
41a383
@@ -28,6 +28,7 @@
41a383
 #include <freetype/ftglyph.h>
41a383
 #include <freetype/ftoutln.h>
41a383
 #include <errno.h>
41a383
+#include <locale.h>
41a383
 #include <stdlib.h>
41a383
 #include <stdio.h>
41a383
 #include <string.h>
41a383
@@ -263,7 +264,7 @@
41a383
 			 );
41a383
   
41a383
   /* Outline support */
41a383
-  g_string_append_printf(paps->header,
41a383
+  paps_string_append_printf(paps->header,
41a383
 			 "/conicto {\n"
41a383
 			 "    /to_y exch def\n"
41a383
 			 "    /to_x exch def\n"
41a383
@@ -691,3 +692,28 @@
41a383
   return points * 1.0 / 72 * PAPS_DPI * PANGO_SCALE;
41a383
 }
41a383
 
41a383
+void
41a383
+paps_string_append_printf(GString *string,
41a383
+			  const gchar *fmt,
41a383
+			  ...)
41a383
+{
41a383
+	gchar *buffer, *lc_numeric;
41a383
+	gint length;
41a383
+	va_list args;
41a383
+
41a383
+	va_start(args, fmt);
41a383
+
41a383
+	lc_numeric = g_strdup(setlocale(LC_NUMERIC, NULL));
41a383
+	setlocale(LC_NUMERIC, "C");
41a383
+
41a383
+	length = g_vasprintf(&buffer, fmt, args);
41a383
+	g_string_append_len(string, buffer, length);
41a383
+
41a383
+	setlocale(LC_NUMERIC, lc_numeric);
41a383
+
41a383
+	g_free(buffer);
41a383
+	g_free(lc_numeric);
41a383
+
41a383
+	va_end(args);
41a383
+}
41a383
+
41a383
diff -ruN paps-0.6.6.orig/src/libpaps.h paps-0.6.6/src/libpaps.h
41a383
--- paps-0.6.6.orig/src/libpaps.h	2007-03-27 20:25:00.000000000 +0900
41a383
+++ paps-0.6.6/src/libpaps.h	2007-03-27 20:31:02.000000000 +0900
41a383
@@ -124,4 +124,8 @@
41a383
  */
41a383
 double paps_postscript_points_to_pango(double points);
41a383
 
41a383
+void paps_string_append_printf(GString *string,
41a383
+			       const gchar *fmt,
41a383
+			       ...) G_GNUC_PRINTF (2, 3);
41a383
+
41a383
 #endif /* LIBPAPS */
41a383
diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
41a383
--- paps-0.6.6.orig/src/paps.c	2007-03-27 20:25:00.000000000 +0900
41a383
+++ paps-0.6.6/src/paps.c	2007-03-27 20:31:33.000000000 +0900
41a383
@@ -992,7 +992,7 @@
41a383
   y_top = page_layout->page_height - page_layout->top_margin - page_layout->header_height - page_layout->header_sep / 2;
41a383
   y_bot = page_layout->bottom_margin - page_layout->footer_height;
41a383
 
41a383
-  g_string_append_printf(ps_pages_string,
41a383
+  paps_string_append_printf(ps_pages_string,
41a383
                          "%f %f moveto %f %f lineto 0 setlinewidth stroke\n",
41a383
                          x_pos, y_top,
41a383
                          x_pos, y_bot);
41a383
@@ -1154,7 +1154,7 @@
41a383
 
41a383
   /* header separator */
41a383
   line_pos = page_layout->page_height - page_layout->top_margin - page_layout->header_height - page_layout->header_sep / 2;
41a383
-  g_string_append_printf(ps_pages_string,
41a383
+  paps_string_append_printf(ps_pages_string,
41a383
                          "%d %f moveto %d %f lineto 0 setlinewidth stroke\n",
41a383
                          page_layout->left_margin, line_pos,
41a383
                          page_layout->page_width - page_layout->right_margin, line_pos);