Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/librsvg/ChangeLog,v
retrieving revision 1.435
diff -u -r1.435 ChangeLog
--- ChangeLog	4 Oct 2005 01:33:50 -0000	1.435
+++ ChangeLog	4 Oct 2005 09:11:00 -0000
@@ -1,3 +1,8 @@
+2005-10-04  Callum McKenzie  <callum@spooky-possum.org>
+
+	* rsvg-shapes.c: Ensure the g_string_append_printf calls in
+	_rsvg_mode_poly_draw run in the "C" locale. Fixes bug #317615.
+
 2005-08-10 Caleb Moore <c.moore@student.unsw.edu.au>
 	
 	* rsvg-paint-server.c, rsvg-art-paint-server.c: Fix bug #317871
Index: rsvg-shapes.c
===================================================================
RCS file: /cvs/gnome/librsvg/rsvg-shapes.c,v
retrieving revision 1.92
diff -u -r1.92 rsvg-shapes.c
--- rsvg-shapes.c	25 Sep 2005 19:40:46 -0000	1.92
+++ rsvg-shapes.c	4 Oct 2005 09:11:00 -0000
@@ -35,6 +35,8 @@
 #include "rsvg-css.h"
 #include "rsvg-defs.h"
 
+#include "locale.h"
+
 /* 4/3 * (1-cos 45)/sin 45 = 4/3 * sqrt(2) - 1 */
 #define RSVG_ARC_MAGIC ((double) 0.5522847498)
 
@@ -147,11 +149,15 @@
 	RsvgNodePoly * poly = (RsvgNodePoly *)self;
 	gsize i;
 	GString * d;
+	gchar *savedlocale;
 
 	/* represent as a "moveto, lineto*, close" path */  
 	if (poly->pointlist_len < 2)
 		return;
 
+	savedlocale = g_strdup (setlocale (LC_ALL, NULL));
+	setlocale (LC_ALL, "C");
+
 	d = g_string_new (NULL);
 	g_string_append_printf (d, "M %f %f ", poly->pointlist[0], poly->pointlist[1] );
 	
@@ -164,6 +170,10 @@
 	rsvg_state_reinherit_top(ctx, self->state, dominate);
 	rsvg_render_path (ctx, d->str);
 
+	if (savedlocale) {
+		setlocale (LC_ALL, savedlocale);
+		g_free (savedlocale);
+	}
 	g_string_free (d, TRUE);
 }
 
