[opencms-dev] Problems through Byte-Order Mark

Philip Kuegler mailinglists at pcom.at
Tue Dec 23 17:19:56 CET 2008


Hi,

There are several possibilities:
1.) Create a new empty file and copy/paste the jsp to there. Then remove 
the old file and rename the new one
or
2.) Edit the file with a text editor (I suggest UltraEdit) and use it to 
remove the BOM
or
3.) Use your preferred IDE, open the file, change the char encoding and 
then save it
or
4.) "vi" the file and remove the BOM manually ;-)
or
5.) copy/paste to notepad and back. So you should get rid of it.

However be aware that the editor you use to open/save the file might be 
the problem. Usually it should provide settings to turn the BOM on or off.

br,
Philip

Yves Glodt wrote:
> Hello,
>
> I have a weird problem, and I noticed about only when I tried to validate my 
> produced html.
>
> It seems one of my templates has a BOM [1], and I found no way to remove it. 
> Strangely the BOM seems to create rendering problems for jsp pages which make 
> use of my template. "Normal" xmlpages which use the same template do not suffer 
> from any problems.
>
> The errors from the validator are these:
>
>  Line 1, Column 0: character "" not allowed in prolog.
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w 
>
>  Line 14, Column 0: character data is not allowed here.
> <body> 
>
>  Line 1, Column 3: XML Parsing Error: Start tag expected, '<' not found.
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w
>
> Note that I have a second template in my project which works fine and does not 
> create rendering errors, and also does not have the BOM
>
> How can I remove the BOM from an OpenCms jsp page?
>
> Best regards,
> Yves
>
>
> [1] http://en.wikipedia.org/wiki/Byte_Order_Mark
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list