loudmouth/lm-parser.c
changeset 102 f47119027379
parent 99 81e9d035de02
child 140 103227122f45
child 152 c736903f577b
--- a/loudmouth/lm-parser.c	Thu Oct 21 23:18:51 2004 +0000
+++ b/loudmouth/lm-parser.c	Fri Oct 29 22:48:03 2004 +0000
@@ -246,40 +246,16 @@
 {
 	g_return_if_fail (parser != NULL);
 	
-	if (!parser->context) {
-		parser->context = g_markup_parse_context_new (parser->m_parser, 0,
-							      parser, NULL);
-	}
-
-	if (!g_utf8_validate (string, -1, NULL)) {
-		gchar *tmp;
-		
-		/* We can't do much better than guess what charset the string is
-		 * encoded in... Try ISO-8859-1.
-		 */
-		tmp = g_convert (string, -1,
-				 "UTF-8", "ISO-8859-1",
-				 NULL, NULL,
-				 NULL);
-		
-		if (tmp) {
-			if (g_markup_parse_context_parse (parser->context, tmp, 
-							  strlen (tmp), NULL)) {
-			} else {
-				g_warning ("Parsing failed\n");
-			}
-			
-			g_free (tmp);
-		} else {
-			g_warning ("Trying to parse a string that is not UTF-8 and not ISO-8859-1.");
-		}
-	} else {
-		if (g_markup_parse_context_parse (parser->context, string, 
-						  strlen (string), NULL)) {
-		} else {
-			g_warning ("Parsing failed\n");
-		}
-	}
+        if (!parser->context) {
+                parser->context = g_markup_parse_context_new (parser->m_parser, 0,
+                                                              parser, NULL);
+        }
+        
+        if (g_markup_parse_context_parse (parser->context, string, 
+                                          strlen (string), NULL)) {
+        } else {
+                g_warning ("Parsing failed\n");
+        }
 }
 
 void