w3it.org community
  
www ITBlog Articles Topics Forums Main
 

XHTML-CSS: Character X not allowed in prolog and Start tag expected

Published: May 31, 2009 - 03:44 PM

There is an error that can come out parsing an html document and it also corrupt the output result in Explorer 8 while seem to not interfere with explorer 7 or Firefox or Safari, caused from a wrong "save file as" on text editors. The text editor mode when save files need to be set as ANSI/ASCII and not as UTF8 or something else (for my personal experience).
While the default format for saved files was set as UTF8, parsed documents was returning this errors:

Line 1, Column 1: character X not allowed in prolog
and
XML Parsing Error: Start tag expected, '<' not found

On all tested browsers the output was returned correctly by the way, while in Explorer 8 tables output is not well aligned. In a windows machine it was working without problems about output also in explorer 8 while in a UNIX-Linux server environment not.
In any case the w3c validator do not complete the correct validation returning errors above reported. The solution to solve this issues with validator response and browsers, is to set the text editor when files are saved, in ANSI/ASCII mode, and not others formats if it is not expressly needed.
 

Comments

Add a new Comment
Author: Landish
Oct 17, 2009
another option
or you can just save files in UTF-8 Without BOM :)

Add a new Comment





Full tags list

Who's online

4 anonymous users and 0 registered users online.

You are an unregistered user or have not logged in.