Index: gtk/gtkentry.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
retrieving revision 1.268.2.4
diff -u -r1.268.2.4 gtkentry.c
--- gtk/gtkentry.c	4 Feb 2005 15:36:02 -0000	1.268.2.4
+++ gtk/gtkentry.c	13 Mar 2005 09:21:31 -0000
@@ -2546,7 +2546,7 @@
 			  			 prev_pos,
 						 entry->current_pos);
 	  normalized_text = g_utf8_normalize (cluster_text,
-			  		      strlen (cluster_text),
+			  		      -1,
 					      G_NORMALIZE_NFD);
           len = g_utf8_strlen (normalized_text, -1);
 
@@ -2554,10 +2554,22 @@
 	  if (len > 1)
 	    {
 	      gint pos = entry->current_pos;
+	      gint bytelen = g_utf8_offset_to_pointer (normalized_text, len - 1)
+		               - normalized_text;
+
+	      if (strcmp (normalized_text, cluster_text) != 0)
+		{
+		  /* recompose the previously precomposed cluster */
+	          gchar *to_insert = g_utf8_normalize (normalized_text,
+						       bytelen,
+						       G_NORMALIZE_NFC);
+	          gtk_editable_insert_text (editable, to_insert, -1, &pos);
+	          g_free (to_insert);
+		}
+	      else
+	        gtk_editable_insert_text (editable, normalized_text, bytelen,
+					  &pos);
 
-	      gtk_editable_insert_text (editable, normalized_text,
-					g_utf8_offset_to_pointer (normalized_text, len - 1) - normalized_text,
-					&pos);
 	      gtk_editable_set_position (editable, pos);
 	    }
 
Index: gtk/gtktextbuffer.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextbuffer.c,v
retrieving revision 1.95
diff -u -r1.95 gtktextbuffer.c
--- gtk/gtktextbuffer.c	1 Nov 2004 19:57:13 -0000	1.95
+++ gtk/gtktextbuffer.c	13 Mar 2005 09:22:01 -0000
@@ -3382,16 +3382,36 @@
       if (backspace_deletes_character)
 	{
 	  gchar *normalized_text = g_utf8_normalize (cluster_text,
-						     strlen (cluster_text),
+						     -1,
 						     G_NORMALIZE_NFD);
 	  glong len = g_utf8_strlen (normalized_text, -1);
 	  
 	  if (len > 1)
-	    gtk_text_buffer_insert_interactive (buffer,
-						&start,
-						normalized_text,
-						g_utf8_offset_to_pointer (normalized_text, len - 1) - normalized_text,
-						default_editable);
+	    {
+	      gint bytelen = g_utf8_offset_to_pointer (normalized_text, len - 1)
+		               - normalized_text;
+
+	      if (strcmp (normalized_text, cluster_text) != 0)
+	        {
+		  /* recompose the previously precomposed cluster */
+	          gchar *to_insert = g_utf8_normalize (normalized_text,
+						       bytelen,
+						       G_NORMALIZE_NFC);
+
+	          gtk_text_buffer_insert_interactive (buffer,
+						      &start,
+						      to_insert,
+						      -1,
+						      default_editable);
+	          g_free (to_insert);
+		}
+	      else
+	        gtk_text_buffer_insert_interactive (buffer,
+						    &start,
+						    normalized_text,
+						    bytelen,
+						    default_editable);
+	    }
 	  
 	  g_free (normalized_text);
 	}
