[opencms-dev] Problems through Byte-Order Mark

Nikolas Lotz nlotz at nde.ag
Tue Jan 27 15:07:05 CET 2009


> Ok, late reply... To keep it short: I could not get rid of the BOM. The
> problem could be that I use kate (http://www.kate-editor.org/) to access
> the jsp files through webdavs:// which works fine, but it seems that once
> somehow that BOM appeared, I cannot get rid of it anymore.
>
> Even opening the jsps directly in the workplace-editor, copy/pasting
> into a blank editor window, saving, reopening the file and re-copy/paste
> it back to the workplace-editor did not remove the BOM
>
> Any other ideas... ?
>
> Best regards,
> Yves

Just an idea ... couldn't you try to remove all BOMs via SQL ?
An update-statement for MySQL could look something like this:

mysql> UPDATE CMS_CONTENTS SET FILE_CONTENT=SUBSTR(FILE_CONTENT,3) WHERE
FILE_CONTENT LIKE CONCAT(0xff,0xfe,'%');

The statement above is supposed to remove all Little Endian 16 Bit BOMs
(0xfffe) from the column FILE_CONTENT in CMS_CONTENTS.

I didn't test this at all, so make sure you have a working backup of your
database. Also consider that binary data in the FILE_CONTENT-column will
get corrupted if the first two bytes are 0xff and 0xfe.

-- 
Nikolas Lotz                            voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG      fax     : +49-40-559 51 77
Postfach 61 03 15                       mobile  : +49-163-758-6751
D-22423 Hamburg                         e-mail  : nlotz at nde.ag

        Vorsitzende des Aufsichtsrates: Angelika Mozdzen
          Sitz und Registergericht: Hamburg, HRB 90934
                  Vorstand: Jens-U. Mozdzen
                   USt-IdNr. DE 814 013 983




More information about the opencms-dev mailing list