[opencms-dev] Problems through Byte-Order Mark

Philip Kuegler mailinglists at pcom.at
Sun Feb 1 11:33:24 CET 2009


I do know similar issues, but not with openCMS yet. When creating jsp's 
for tomcat for plain delivery (no framework used) I once had to play 
around with page encoding. The pages did not only contain "hardcoded" 
jsp code, but also content that was fetched in-time from 3rd party 
interfaces and xml files from disk. In fact I had two problems:
  1.) The Strings that built up the page did have different encodings.
  2.) The system language (default OS file encoding) was set to "c" 
which in fact has been 8bit ascii and not UTF-8 (e.g. declare -x 
LANG="en_US.UTF-8")
  3.) Tomcat was to set deliver ISO-8859-1 encoded pages by default.

I did mostly end up with either UTF-8 characters interpreted as 1 Bit 
chars  or characters that were encoded twice (1 UTF-8 char was encoded 
to 2 UTF-8 chars as both bytes from the original UTF-8 were encoded again).

Did you change the default encoding somewhere?
Did you set the "page-encoding" (or similar) directives on any jsp pages 
or in the opencms properties?
Did copying the content to a new empty file solve the problem (does the 
new file cause the same issues)?
Are there any npc (non-printable-characters) somewhere in the jsp code 
that might create these issues (ignored by the gui, but messing up the 
layout)?

Can you provide a stand alone example of the jsp?

br,
Philip



Yves Glodt wrote:
> [...]
> I have another site which I host in my opencms instance, whose jsps 
> also have a BOM when I check them with the hex editor, but which do 
> *NOT* have them any more when I fetch the html files with wget.
>
>
> In my first site, the one which made me post on this list about the 
> BOM, the jsp which contain the BOM mess up the layout (no I did not 
> smoke anything today). They insert a blank line in several spaces in 
> the layout.
>
>
> So in the meantime I am not sure any more that the BOM causes a direct 
> problem to my content, since all of the jsp seem to contain it when 
> accessed in the vfs.
>
>
> But, the BOM seems in some cases be included in the pages when opencms 
> serves them, and this seems to create a problem for me... Anyone 
> having an idea where the "served BOM" could come from ?
>
>
> regards,
> Yves
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20090201/355705b2/attachment.html>


More information about the opencms-dev mailing list