diff -uNr glib-2.36.2.orig/glib/gutf8.c glib-2.36.2/glib/gutf8.c
--- glib-2.36.2.orig/glib/gutf8.c	2013-03-08 01:45:22.000000000 +0400
+++ glib-2.36.2/glib/gutf8.c	2013-05-18 16:33:26.407547000 +0400
@@ -437,6 +437,65 @@
   return dest;
 }
 
+/**
+ * g_utf8_strescape:
+ * @source: a string to escape
+ * @exceptions: a string of characters not to escape in source
+ *
+ * Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\' and '"' in
+ * the string source by inserting a '\' before them. Characters supplied in
+ * exceptions are not escaped.
+ * Unlike g_strescape() UTF-8 characters are preseved.
+ *
+ * Return value: a newly-allocated copy of @source with certain characters
+ *   escaped. See above.
+ *
+ * Since: 2.24
+ **/
+gchar *
+g_utf8_strescape (const gchar *source,
+                  const gchar *exceptions)
+{
+  GString *result = g_string_new (NULL);
+
+  while (TRUE)
+    {
+      gchar c = *source++;
+
+      switch (c)
+        {
+        case '\0':
+          goto done;
+        case '\n':
+          g_string_append (result, "\\n");
+          break;
+        case '\"':
+          g_string_append (result, "\\\"");
+          break;
+        case '\\':
+          g_string_append (result, "\\\\");
+          break;
+        case '\b':
+          g_string_append (result, "\\b");
+          break;
+        case '\f':
+          g_string_append (result, "\\f");
+          break;
+        case '\r':
+          g_string_append (result, "\\r");
+          break;
+        case '\t':
+          g_string_append (result, "\\t");
+          break;
+        default:
+          g_string_append_c (result, c);
+        }
+    }
+
+ done:
+  return g_string_free (result, FALSE);
+}
+
 /* unicode_strchr */
 
 /**
