about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/SGML.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2008-09-17 01:14:02 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2008-09-17 01:14:02 -0400
commitf3c91bbbca5ebc55f001083207765c717e2fdbf9 (patch)
tree7a5181b0a33ceab526d10ef5ff0feff800ae3d6b /WWW/Library/Implementation/SGML.c
parentb64489ef364361173db889faaf608495b887edf2 (diff)
downloadlynx-snapshots-f3c91bbbca5ebc55f001083207765c717e2fdbf9.tar.gz
snapshot of project "lynx", label v2-8-7dev_9m
Diffstat (limited to 'WWW/Library/Implementation/SGML.c')
-rw-r--r--WWW/Library/Implementation/SGML.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 51e7895b..accc23a2 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: SGML.c,v 1.114 2008/09/10 12:56:58 tom Exp $
+ * $LynxId: SGML.c,v 1.115 2008/09/17 00:45:07 tom Exp $
  *
  *			General SGML Parser code		SGML.c
  *			========================
@@ -876,12 +876,12 @@ static void handle_processing_instruction(HTStream *context)
 
     CTRACE((tfp, "SGML Processing instruction:\n<%s>\n", s));
 
-    if (!strncmp(s, "?xml", 4)) {
+    if (!strncmp(s, "?xml ", 5)) {
 	int flag = context->T.decode_utf8;
 
 	context->strict_xml = TRUE;
 	/*
-	 * Switch to UTF-8 unless the encoding is explicitly not "utf-8".
+	 * Switch to UTF-8 if the encoding is explicitly "utf-8".
 	 */
 	if (!flag) {
 	    char *t = strstr(s, "encoding=");
@@ -891,8 +891,6 @@ static void handle_processing_instruction(HTStream *context)
 		if (*t == '"')
 		    ++t;
 		flag = !strncmp(t, "utf-8", 5);
-	    } else {
-		flag = TRUE;
 	    }
 	    if (flag) {
 		CTRACE((tfp, "...Use UTF-8 for XML\n"));