[evolution-patches] patch for 47474



Hi,
	47474, which is newly created bug for the lost 47535, is attached 
incorporating feeback from NotZed.
	
Thanks & Regards,
Suresh
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/ChangeLog,v
retrieving revision 1.790
diff -u -r1.790 ChangeLog
--- ChangeLog	25 Jun 2003 17:24:34 -0000	1.790
+++ ChangeLog	11 Aug 2003 17:20:41 -0000
@@ -1,3 +1,8 @@
+2003-08-07  Suresh Chandrasekharan  <suresh chandrasekharan sun com>
+
+	* gal/util/e-util.c (e_filename_make_safe): Fix for 47474
+	e_filename_make_safe routine not utf8 friendly.
+
 2003-06-25  Mike Kestner  <mkestner ximian com>
 
 	* configure.in : releasing 1.99.8
Index: gal/util/e-util.c
===================================================================
RCS file: /cvs/gnome/gal/gal/util/e-util.c,v
retrieving revision 1.60
diff -u -r1.60 e-util.c
--- gal/util/e-util.c	31 May 2003 17:21:23 -0000	1.60
+++ gal/util/e-util.c	11 Aug 2003 17:20:41 -0000
@@ -418,13 +418,20 @@
 void
 e_filename_make_safe (gchar *string)
 {
-	gchar *p;
+	gchar *p, *ts;
+	gunichar c;
 	
 	g_return_if_fail (string != NULL);
-	
-	for (p = string; *p; p++) {
-		if (!isprint ((unsigned char)*p) || strchr (" /'\"`&();|<>$%{}!", *p))
-			*p = '_';
+	p = string;
+
+	while(p && *p) {
+		c = g_utf8_get_char (p);
+		ts = p;
+		p = g_utf8_next_char (p);
+		if (!g_unichar_isprint(c) || ( c < 0xff && strchr (" /'\"`&();|<>$%{}!", c&0xff ))) {
+			while (ts<p) 	
+				*ts++ = '_';
+		}
 	}
 }
 


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